From 32c94621adeb1dca9bd70a6bfbbf8402806d4496 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 10 Feb 2026 06:43:09 +0800 Subject: vim-patch:9e456e5: runtime(doc): clarify the use of 'iskeyword' option value In particular, also mention the difference between the regex atom \k and what Vim considers for a word character. closes: vim/vim#18688 https://github.com/vim/vim/commit/9e456e52df83f64075ce94c9a5adc43e221a6d3c Co-authored-by: Christian Brabandt --- runtime/lua/vim/_meta/options.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'runtime/lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index c1e35052a2..bd0bbbafa4 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -3718,7 +3718,13 @@ vim.go.isi = vim.go.isident --- "w", "*", "[i", etc. It is also used for "\k" in a `pattern`. See --- 'isfname' for a description of the format of this option. For '@' --- characters above 255 check the "word" character class (any character ---- that is not white space or punctuation). +--- that is categorized as a letter, number or emoji according to the +--- Unicode general category). +--- +--- Note that there is a difference between the "\k" character class and +--- the `word` motion. The former matches any word character, while the +--- latter stops at a change of the character class. +--- --- For C programs you could use "a-z,A-Z,48-57,_,.,-,>". --- For a help file it is set to all non-blank printable characters except --- "*", '"' and '|' (so that CTRL-] on a command finds the help for that -- cgit