我经常发现自己进行了视觉选择,然后按 d 或 x 删除并切换到 i 的插入模式。
是否有一个按键会删除当前的视觉选择并将我置于插入模式?
答案 0 :(得分:6)
使用c
或s
更改文字并保持插入模式
答案 1 :(得分:3)
我想你只想按 s
答案 2 :(得分:3)
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
。