Mic*_*ant 5 vim keyboard-shortcuts vi
我发现我可以使用t c或Tc移动到下一个/上一个字符c
我也可以使用fc或Fc移动到下一个/上一个字符c
它们之间的唯一区别是将tc光标放置在字符之前,Tc(向后)将光标放置在字符之后fc和/Fc两者都将其放置在字符本身上吗?
它们之间唯一的区别是光标位置。从: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.
Run Code Online (Sandbox Code Playgroud)