2

我经常发现自己在进行视觉选择,然后点击dx删除并切换到插入模式i

是否有一个按键可以删除当前的视觉选择并让我进入插入模式?

4

3 回答 3

8

使用cs更改文本并保持插入模式

于 2013-10-10T20:27:06.083 回答
7

我想你只是想按s

于 2013-10-10T20:26:51.643 回答
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.

于 2013-10-10T20:32:02.847 回答