Re: The "leading zero means octal" thing...

Liste des GroupesRevenir à cu shell 
Sujet : Re: The "leading zero means octal" thing...
De : * (at) *nospam* eli.users.panix.com (Eli the Bearded)
Groupes : comp.lang.tcl comp.unix.shell comp.editors
Date : 05. Jan 2025, 02:55:17
Autres entêtes
Organisation : Some absurd concept
Message-ID : <eli$2501042055@qaz.wtf>
References : 1
User-Agent : Vectrex rn 2.1 (beta)
In comp.unix.shell, Kenny McCormack <gazelle@shell.xmission.com> wrote:
First of all, yes, I know this is all standardized and it is based on
legacy C conventions and it can't be changed and so on and so forth.
 
But if not a bug, it is certainly a misfeature.

I can see it as a legacy feature that has grown so old as to be a
misfeature. Other than bit patterns for chmod, I never see octal used
for modern stuff.

the VIM editor.

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=

If you have no vimrc, the defaults.vim shipped with the editor (vim 8)
sets that to recognize decimal, binary ("0b10101"), and hexadecimal
("0xcafe").  But the compiled in default also includes the dreaded
octal.

You might want to peruse the defaults.vim file for modern recommended
defaults. Except for scrolloff and incsearch, I don't find them that
unpleasant. I think a lot of people like incsearch, and I like scrolloff
on occaison, but not regularly.

Start vim, then ":e $VIMRUNTIME/defaults.vim" to view the defaults file.

Elijah
------
prefers vim acting mostly "compatible"

Date Sujet#  Auteur
4 Jan 25 * The "leading zero means octal" thing...14Kenny McCormack
4 Jan 25 +* Re: The "leading zero means octal" thing...2Janis Papanagnou
5 Jan 25 i`- Re: The "leading zero means octal" thing...1Kenny McCormack
5 Jan 25 +* Re: The "leading zero means octal" thing...2Rich
5 Jan 25 i`- Re: The "leading zero means octal" thing...1Kenny McCormack
5 Jan 25 +* Re: The "leading zero means octal" thing...5Eli the Bearded
5 Jan 25 i`* Re: The "leading zero means octal" thing...4Kenny McCormack
5 Jan 25 i `* Re: The "leading zero means octal" thing...3Kenny McCormack
5 Jan 25 i  +- 'nf' in VIM (Was: The "leading zero means octal" thing...)1Kenny McCormack
5 Jan 25 i  `- Re: The "leading zero means octal" thing...1Janis Papanagnou
5 Jan 25 +- Re: The "leading zero means octal" thing...1Joe Makowiec
5 Jan 25 +* Re: The "leading zero means octal" thing...2saito
5 Jan 25 i`- Re: The "leading zero means octal" thing...1Kenny McCormack
6 Jan 25 `- Re: The "leading zero means octal" thing...1Eric Pozharski

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal