我经常发现自己在进行视觉选择,然后点击d或x删除并切换到插入模式i。
是否有一个按键可以删除当前的视觉选择并让我进入插入模式?
使用c
或s
更改文本并保持插入模式
我想你只是想按s
vim 帮助只是准确地回答了您的问题:
{Visual}["x]c or *v_c* *v_s*
{Visual}["x]s Delete the highlighted text [into register x] and
start insert (for {Visual} see |Visual-mode|). {not
in Vi}
*v_r*
{Visual}["x]r{char} Replace all selected characters by {char}.
*v_C*
{Visual}["x]C Delete the highlighted lines [into register x] and
start insert. In Visual block mode it works
differently |v_b_C|. {not in Vi}
*v_S*
{Visual}["x]S Delete the highlighted lines [into register x] and
start insert (for {Visual} see |Visual-mode|). {not
in Vi}
*v_R*
{Visual}["x]R Currently just like {Visual}["x]S. In a next version
it might work differently. {not in Vi}
我会提醒surround plugin
用户,使用其默认映射,它会覆盖{visual}S
.