Sujet : 'nf' in VIM (Was: The "leading zero means octal" thing...)
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.lang.tcl comp.unix.shell comp.editorsDate : 05. Jan 2025, 08:05:29
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vldavp$2jdk0$1@news.xmission.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
vld933$2jcih$1@news.xmission.com>,
Kenny McCormack <
gazelle@shell.xmission.com> wrote:
In article <vld4k2$2jao9$1@news.xmission.com>,
Kenny McCormack <gazelle@shell.xmission.com> wrote:
In article <eli$2501042055@qaz.wtf>,
Eli the Bearded <*@eli.users.panix.com> wrote:
...
Vim is highly configurable. See ":help nrformats" for supported formats.
Not clearly documented in the version I have, but implied, is setting
it to a blank string to only recognize ordinary decimal numbers.
>
:set nrformats=
>
Thanks for the tip. I'll look into that.
>
Yes, nf looks good. I set it to "alpha", which makes it do the right thing
with letters, while ignoring the stupid hex/octal/bin stuff.
And one more thing...
It seems nf is buffer-local, so setting it while in one buffer does not
change it globally. Setting it in .vimrc does set it globally (which makes
sense, since no other buffers exist at that point - and they all inherit
the value).
I get why this is the way it works, but am curious if there is a way to set
it globally (without exiting and re-starting VIM, of course). I have lots
of windows and buffers open and don't want to re-start.
I read "help :set" and it covers a lot, but didn't see anything
specifically on this topic.
-- I've learned that people will forget what you said, people will forgetwhat you did, but people will never forget how you made them feel. - Maya Angelou -