2015-01-05 55 views
4

有W¯¯之間的任何差異,ë瓦特Èb大寫VS小寫字運動命令

遊戲vim adventures有你拿起一個大寫爲了跳過岩石上的一個感嘆號,即:

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。

+2

http://stackoverflow.com/questions/22931032/vim-word-vsword – happydave

回答

15

這基本上歸結於vi認爲是一個'單詞'。

這裏的一段文字,但導航使用大寫W,B等:

enter image description here

和這裏的使用小寫W,B等相同的文本導航:

enter image description here

基本上'WORD'被空白包圍,而'單詞'可以被包圍幷包括某些字符,例如 - 或'等。