W , E , B 和 w 之间是否存在差异, e 和 b ?
游戏vim adventures让你拿起一个大写的 B ,以便在感叹号上跳过一块石头,即:
Remember: wordsXare not WORDSX!
两个'X'分别代表宝箱和岩石。为了跳过岩石,必须使用大写的 B 而不是小写的 b 。然后在usr_03.txt,第03.1节中,它讨论了大写字运动命令。
It is also possible to move by white-space separated WORDs. This is not a word in the normal sense, that's why the uppercase is used. The commands for moving by WORDs are also uppercase, as this figure shows: ge b w e <- <- ---> ---> This is-a line, with special/separated/words (and some more). ~ <----- <----- --------------------> -----> gE B W E With this mix of lowercase and uppercase commands, you can quickly move forward and backward through a paragraph.
但是当我执行:help W
命令时,它给了我这个:
4. Word motions word-motions or <S-Right> w w [count] words forward. |exclusive| motion. or <C-Right> W W [count] WORDS forward. |exclusive| motion.
似乎没有任何区别。我正在使用Vim 7.4。
答案 0 :(得分:28)
这基本上归结为vi认为是&#39;字。
这是一段文字,但使用大写的W,B等进行导航:
以及使用小写w,b等导航的相同文本:
基本上是一个&#39; WORD&#39;被空白包围,而一个词是&#39;可以被包围并包含某些字符,例如 - 或&#39;等