diff options
author | Felipe Morales <hel.sheep@gmail.com> | 2015-05-16 02:07:56 -0300 |
---|---|---|
committer | Michael Reed <m.reed@mykolab.com> | 2015-05-29 00:39:22 -0400 |
commit | fa0f1222212704c93ab828b876bda5e9e1cb507e (patch) | |
tree | 56040761ba94f89ef2baa1ca4c26938dea0d6a8a /runtime | |
parent | ee312ca9a4d35132059db80b13153ce71faa4ae6 (diff) | |
download | rneovim-fa0f1222212704c93ab828b876bda5e9e1cb507e.tar.gz rneovim-fa0f1222212704c93ab828b876bda5e9e1cb507e.tar.bz2 rneovim-fa0f1222212704c93ab828b876bda5e9e1cb507e.zip |
Remove 'octal' from default value for '&nrformats' #2668
<C-A> over "07" should increment to "08" by default.
Re: https://github.com/neovim/neovim/issues/1664
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Scott Prager <splinterofchaos@gmail.com>
Reviewed-by: Michael Reed <m.reed@mykolab.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | runtime/doc/usr_26.txt | 21 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 1 |
3 files changed, 8 insertions, 16 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index fadcbac9f1..9411014c24 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4691,7 +4691,7 @@ A jump table for the options with a short description can be found at |Q_op|. recognized as a multi click. *'nrformats'* *'nf'* -'nrformats' 'nf' string (default "octal,hex") +'nrformats' 'nf' string (default "hex") local to buffer This defines what bases Vim will consider for numbers when using the CTRL-A and CTRL-X commands for adding to and subtracting from a number diff --git a/runtime/doc/usr_26.txt b/runtime/doc/usr_26.txt index cc23959621..6a4a375582 100644 --- a/runtime/doc/usr_26.txt +++ b/runtime/doc/usr_26.txt @@ -81,24 +81,15 @@ Move the cursor to "1." and type: > The "1." will change to "4.". Again, you can use "." to repeat this on the other numbers. -Another example: - - 006 foo bar ~ - 007 foo bar ~ - -Using CTRL-A on these numbers results in: - - 007 foo bar ~ - 010 foo bar ~ +The CTRL-X command does subtraction in a similar way. -7 plus one is 10? What happened here is that Vim recognized "007" as an octal -number, because there is a leading zero. This notation is often used in C -programs. If you do not want a number with leading zeros to be handled as -octal, use this: > +The behavior of CTRL-A and CTRL-X depends on the value of |'nrformats'|. For +example, if you use: > - :set nrformats-=octal + :set nrformats+=octal -The CTRL-X command does subtraction in a similar way. +pressing CTRL-A over "007" will increment to "010", because "007" will be +identified as an octal number. ============================================================================== *26.3* Making a change in many files diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index a14a6d5f4f..f3f3e961d1 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -32,6 +32,7 @@ these differences. - 'encoding' defaults to "utf-8" - 'formatoptions' defaults to "tcqj" - 'nocompatible' is always set +- 'nrformats' defaults to "hex" - 'tags' defaults to "./tags;,tags" - 'ttyfast' is always set - 'wildmenu' is set by default |