diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-01-19 23:36:15 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-01-19 23:36:15 +0100 |
commit | f7edf40448a09e04eec3bd05e043f7fea93b07c9 (patch) | |
tree | 044c6550e8bb32b9291c1bc4ba717e46670a1453 /runtime/doc/change.txt | |
parent | b8060fe862f684b591f9ac679eac5b2594d6c5a0 (diff) | |
download | vim-git-f7edf40448a09e04eec3bd05e043f7fea93b07c9.tar.gz |
patch 7.4.1143v7.4.1143
Problem: Can't sort on floating point numbers.
Solution: Add the "f" flag to ":sort". (Alex Jakushev) Also add the "f"
flag to sort().
Diffstat (limited to 'runtime/doc/change.txt')
-rw-r--r-- | runtime/doc/change.txt | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 6dd20ad8b..ac1b8b686 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.4. Last change: 2016 Jan 02 +*change.txt* For Vim version 7.4. Last change: 2016 Jan 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1745,7 +1745,7 @@ Vim has a sorting function and a sorting command. The sorting function can be found here: |sort()|, |uniq()|. *:sor* *:sort* -:[range]sor[t][!] [i][u][r][n][x][o][b] [/{pattern}/] +:[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/] Sort lines in [range]. When no range is given all lines are sorted. @@ -1753,10 +1753,18 @@ found here: |sort()|, |uniq()|. With [i] case is ignored. + Options [n][f][x][o][b] are mutually exclusive. + With [n] sorting is done on the first decimal number in the line (after or inside a {pattern} match). One leading '-' is included in the number. + With [f] sorting is done on the Float in the line. + The value of Float is determined similar to passing + the text (after or inside a {pattern} match) to + str2float() function. This option is available only + if Vim was compiled with Floating point support. + With [x] sorting is done on the first hexadecimal number in the line (after or inside a {pattern} match). A leading "0x" or "0X" is ignored. @@ -1768,10 +1776,10 @@ found here: |sort()|, |uniq()|. 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 - will be kept in their original order. + With [u] (u stands for unique) only keep the first of + a sequence of identical lines (ignoring case when [i] + is used). Without this flag, a sequence of identical + lines will be kept in their original order. Note that leading and trailing white space may cause lines to be different. |