patch 7.4.1027
Problem: No support for binary numbers.
Solution: Add "bin" to nrformats. (Jason Schulz)
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index d1fcb5d..6ccf93d 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -416,9 +416,14 @@
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.
+The CTRL-A and CTRL-X commands can work for:
+- signed and unsigned decimal numbers
+- unsigned binary, octal and hexadecimal numbers
+- alphabetic characters
+
+This depends on the 'nrformats' option:
+- When 'nrformats' includes "bin", Vim assumes numbers starting with '0b' or
+ '0B' are binary.
- When 'nrformats' includes "octal", Vim considers numbers starting with a '0'
to be octal, unless the number includes a '8' or '9'. Other numbers are
decimal and may have a preceding minus sign.
@@ -447,6 +452,10 @@
Note that when 'nrformats' includes "octal", decimal numbers with leading
zeros cause mistakes, because they can be confused with octal numbers.
+Note similarly, when 'nrformats' includes "bin", binary numbers with a leading
+'0x' or '0X' can be interpreted as hexadecimal rather than binary since '0b'
+are valid hexadecimal digits.
+
The CTRL-A command is very useful in a macro. Example: Use the following
steps to make a numbered list.
@@ -1736,7 +1745,7 @@
found here: |sort()|, |uniq()|.
*:sor* *:sort*
-:[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/]
+:[range]sor[t][!] [i][u][r][n][x][o][b] [/{pattern}/]
Sort lines in [range]. When no range is given all
lines are sorted.
@@ -1756,6 +1765,9 @@
With [o] sorting is done on the first octal number in
the line (after or inside a {pattern} match).
+ With [b] sorting is done on the first binary number in
+ the line (after or inside a {pattern} match).
+
With [u] only keep the first of a sequence of
identical lines (ignoring case when [i] is used).
Without this flag, a sequence of identical lines