Groups | Search | Server Info | Login | Register


Groups > comp.editors > #106850

Re: Vim 9 - but older releases preferred

From Eli the Bearded <*@eli.users.panix.com>
Newsgroups comp.editors
Subject Re: Vim 9 - but older releases preferred
Date 2025-11-17 02:23 +0000
Organization Some absurd concept
Message-ID <eli$2511162102@qaz.wtf> (permalink)
References <10fat2b$3p5tk$1@dont-email.me> <10fbt71$3p5tk$2@dont-email.me> <eli$2511160331@qaz.wtf> <10fc9ri$3p5tk$3@dont-email.me>

Show all headers | View raw


In comp.editors, Janis Papanagnou replied to me:
>>   * Similarly ctrl-a / ctrl-x number increment / decrement
> Occasionally it's useful. - Mind surprises, though, e.g. when
> trying to increment the month or day component of an ISO date!
> (Been there.)

This sounds like you would benefit from setting nrformats.

default: nrformats=bin,octal,hex
    0b1011  >> ctrl-a >>  0b1100
    001357  >> ctrl-a >>  001360
    0xfeed  >> ctrl-a >>  0xfeee
    456789  >> ctrl-a >>  456790

empty: nrformats=
    0b1011  >> ctrl-a >>  1b1011
    001357  >> ctrl-a >>  001358
    0xfeed  >> ctrl-a >>  1xfeed
    456789  >> ctrl-a >>  456790

In each case, cursor was on first non-blank character. When it is blank,
only decimal numbers are recognized.

> But very useful also if you want to add a certain offset, say 7,
> to many fields, '7' 'Ctrl-A' then move to other places and just
> repeat (with '.').

I've used it in tail-recursive macros to renumber things in large
files after adding or deleting a few things.

>> There are many Bram extensions I don't get a lot of value from,
>> like vimscript,
> I do no scripting in Vim.

Vim plugins are written in vimscript and many people find those useful.

>> and colors in my editor (eg search highlighting).
> I'm ambivalent here; it's useful but the way it's implemented isn't
> very appealing in some cases.

There are ways to tailor colors, but I'm not the person to ask about
that. I use "set t_Co=" (set to empty) to disable them. The t_??
settings override terminal features defined in termcap. It's almost
black magic.

Elijah
------
also sets t_8u blank (for underline color)

Back to comp.editors | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Vim 9 - but older releases preferred Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-11-15 22:58 +0100
  Re: Vim 9 - but older releases preferred Eli the Bearded <*@eli.users.panix.com> - 2025-11-15 23:01 +0000
    Re: Vim 9 - but older releases preferred Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-11-16 08:07 +0100
      Re: Vim 9 - but older releases preferred Eli the Bearded <*@eli.users.panix.com> - 2025-11-16 09:01 +0000
        Re: Vim 9 - but older releases preferred Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-11-16 11:42 +0100
          Re: Vim 9 - but older releases preferred Eli the Bearded <*@eli.users.panix.com> - 2025-11-17 02:23 +0000
            Re: Vim 9 - but older releases preferred Eli the Bearded <*@eli.users.panix.com> - 2025-11-17 20:19 +0000
      Re: Vim 9 - but older releases preferred Anton Shepelev <anton.txt@gmail.moc> - 2025-12-06 01:26 +0300
        Re: Vim 9 - but older releases preferred "Jeffrey H. Johnson" <johnsonjh.dev@gmail.com> - 2025-12-08 03:15 +0000
  Re: Vim 9 - but older releases preferred John McCue <jmclnx@gmail.com.invalid> - 2025-11-16 13:46 +0000

csiph-web