Sujet : Re: The "leading zero means octal" thing...
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.tcl comp.unix.shell comp.editorsSuivi-à : comp.editorsDate : 05. Jan 2025, 08:39:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vldd0c$u77e$1@dont-email.me>
References : 1 2 3 4
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
[ f'up to comp.editors set ]
On 05.01.2025 07:33, Kenny McCormack 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.
This 'alpha' is an interesting useful feature I didn't know. Thanks.
(It will go into my .vimrc file.)
Testing it I was a bit astonished, though, that (and different from
numbers) it just works on single letters without a "carry"; with the
string "say38", operating a 66^A on the number part creates "say104"
while at any character it stops increment at "z".
(I recall that I once had a requirement to enumerate some date as
aa, ab, ac, ..., az, ba, bb, ..., bz, ..., zz, and even continuing
zz with aaa, as with a numeric carry.)
Janis