Vim
vim中的“find”和“till”有什麼區別?
我看到我可以使用
t
c
orT``c
移動到下一個/上一個字元c
我也可以使用
f``c
或F``c
移動到下一個/上一個字元c
它們之間的唯一區別是
t``c
將游標放在字元之前,T``c
(向後)將游標放在字元之後和f``c
/F``c
都將游標放在字元本身上嗎?
它們之間的唯一區別是游標位置。來自
:help motion.txt
:f f{char} To [count]'th occurrence of {char} to the right. The cursor is placed on {char} inclusive. {char} can be entered as a digraph digraph-arg. When 'encoding' is set to Unicode, composing characters may be used, see utf-8-char-arg. :lmap mappings apply to {char}. The CTRL-^ command in Insert mode can be used to switch this on/off i_CTRL-^. F F{char} To the [count]'th occurrence of {char} to the left. The cursor is placed on {char} exclusive. {char} can be entered like with the f command. t t{char} Till before [count]'th occurrence of {char} to the right. The cursor is placed on the character left of {char} inclusive. {char} can be entered like with the f command. T T{char} Till after [count]'th occurrence of {char} to the left. The cursor is placed on the character right of {char} exclusive. {char} can be entered like with the f command.