aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-09 17:08:21 -0400
committerGitHub <noreply@github.com>2021-05-09 17:08:21 -0400
commitd2be261e8d1bcf165346255ae701564a5f62bf7d (patch)
tree470c5fb8f4e57098295e87f0df318f729569dd83 /runtime/doc/eval.txt
parentf8173df4d7ecec239629921736340d3f4d1dcfd4 (diff)
parenteef5a627bfc4341fdd6f12ea5932d11b12fbf2c0 (diff)
downloadrneovim-d2be261e8d1bcf165346255ae701564a5f62bf7d.tar.gz
rneovim-d2be261e8d1bcf165346255ae701564a5f62bf7d.tar.bz2
rneovim-d2be261e8d1bcf165346255ae701564a5f62bf7d.zip
Merge pull request #14403 from seandewar/vim-8.2.1933
vim-patch:8.2.{0174,1933,1935,1946,2286,2287}
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 885fc2d790..bb352022f9 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1508,6 +1508,15 @@ v:cmdarg This variable is used for two purposes:
the argument for the ":hardcopy" command. This can be used
in 'printexpr'.
+ *v:collate* *collate-variable*
+v:collate The current locale setting for collation order of the runtime
+ environment. This allows Vim scripts to be aware of the
+ current locale encoding. Technical: it's the value of
+ LC_COLLATE. When not using a locale the value is "C".
+ This variable can not be set directly, use the |:language|
+ command.
+ See |multi-lang|.
+
*v:cmdbang* *cmdbang-variable*
v:cmdbang Set like v:cmdarg for a file read/write command. When a "!"
was used the value is 1, otherwise it is 0. Note that this
@@ -8007,6 +8016,23 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
When {func} is given and it is '1' or 'i' then case is
ignored.
+ When {func} is given and it is 'l' then the current collation
+ locale is used for ordering. Implementation details: strcoll()
+ is used to compare strings. See |:language| check or set the
+ collation locale. |v:collate| can also be used to check the
+ current locale. Sorting using the locale typically ignores
+ case. Example: >
+ " ö is sorted similarly to o with English locale.
+ :language collate en_US.UTF8
+ :echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
+< ['n', 'o', 'O', 'ö', 'p', 'z'] ~
+>
+ " ö is sorted after z with Swedish locale.
+ :language collate sv_SE.UTF8
+ :echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
+< ['n', 'o', 'O', 'p', 'z', 'ö'] ~
+ This does not work properly on Mac.
+
When {func} is given and it is 'n' then all items will be
sorted numerical (Implementation detail: this uses the
strtod() function to parse numbers, Strings, Lists, Dicts and