vim帮助文件如何允许视觉单词选择选择具有句点的文本?

时间:2017-09-15 21:56:44

标签: vim

我注意到当我在vim帮助文件中使用命令viw时,它可以选择以下字符串:intro.txt

但是当我创建基本文件并添加文本intro.txt并尝试使用viw选择整个字符串时,视觉选择停在.,所以我只能选择不intro部分的.txt

有人可以解释为什么会这样,以及我如何强制vim选择整个字符串?

1 个答案:

答案 0 :(得分:1)

来自内置帮助:

:help iw
iw          "inner word", select [count] words (see |word|).

... word

A word consists of a sequence of letters, digits and underscores, or a
sequence of other non-blank characters, separated with white space (spaces,
tabs, <EOL>).  This can be changed with the 'iskeyword' option.  An empty line
is also considered to be a word.

... 'iskeyword'

'iskeyword' 'isk'   string (Vim default for MS-DOS and Win32:
                        "@,48-57,_,128-167,224-235"
                   otherwise:  "@,48-57,_,192-255"
                Vi default: "@,48-57,_")
            local to buffer
            {not in Vi}
Keywords are used in searching and recognizing with many commands:
"w", "*", "[i", etc.  It is also used for "\k" in a |pattern|.  See
'isfname' for a description of the format of this option.  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
command).