summaryrefslogtreecommitdiffstats
path: root/runtime/doc/change.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-06-26 19:35:49 +0200
committerBram Moolenaar <Bram@vim.org>2015-06-26 19:35:49 +0200
commit979243b990a68c20ea17fa26470639104e62b071 (patch)
treeea206262bdbb87ff239fcbac2f00c79a0ed276c7 /runtime/doc/change.txt
parente5401220b0def9ac380c7910e18f2e042ed5ddc5 (diff)
Update help files.
Diffstat (limited to 'runtime/doc/change.txt')
-rw-r--r--runtime/doc/change.txt39
1 files changed, 38 insertions, 1 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index c5f4cb40a3..79aa179c93 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 7.4. Last change: 2015 Feb 10
+*change.txt* For Vim version 7.4. Last change: 2015 Jun 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -379,10 +379,43 @@ Adding and subtracting ~
CTRL-A Add [count] to the number or alphabetic character at
or after the cursor. {not in Vi}
+ *v_CTRL-A*
+{Visual}CTRL-A Add [count] to the number or alphabetic character in
+ the highlighted text. {not in Vi}
+
+ *v_g_CTRL-A*
+{Visual}g CTRL-A Add [count] to the number or alphabetic character in
+ the highlighted text. If several lines are
+ highlighted, each one will be incremented by an
+ additional [count] (so effectively creating a
+ [count] incrementing sequence). {not in Vi}
+ For Example, if you have this list of numbers:
+ 1. ~
+ 1. ~
+ 1. ~
+ 1. ~
+ Move to the second "1." and Visually select three
+ lines, pressing g CTRL-A results in:
+ 1. ~
+ 2. ~
+ 3. ~
+ 4. ~
+
*CTRL-X*
CTRL-X Subtract [count] from the number or alphabetic
character at or after the cursor. {not in Vi}
+ *v_CTRL-X*
+{Visual}CTRL-X Subtract [count] from the number or alphabetic
+ character in the highlighted text. {not in Vi}
+
+ *v_g_CTRL-X*
+{Visual}g CTRL-X Subtract [count] from the number or alphabetic
+ character in the highlighted text. If several lines
+ are highlighted, each value will be decremented by an
+ additional [count] (so effectively creating a [count]
+ decrementing sequence). {not in Vi}
+
The CTRL-A and CTRL-X commands work for (signed) decimal numbers, unsigned
octal and hexadecimal numbers and alphabetic characters. This depends on the
'nrformats' option.
@@ -399,6 +432,10 @@ octal and hexadecimal numbers and alphabetic characters. This depends on the
under or after the cursor. This is useful to make lists with an alphabetic
index.
+For decimals a leading negative sign is considered for incrementing/
+decrementing, for octal and hex values, it won't be considered.
+To ignore the sign Visually select the number before using CTRL-A or CTRL-X.
+
For numbers with leading zeros (including all octal and hexadecimal numbers),
Vim preserves the number of characters in the number when possible. CTRL-A on
"0077" results in "0100", CTRL-X on "0x100" results in "0x0ff".