Vim delete visual selection and switch to insert mode

会有一股神秘感。 提交于 2019-12-03 09:13:54

Use c or s to change the text and remain in insert mode

I think you just want to press s

The vim help just answers your question exactly:

{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}

I would remind the surround plugin users, with its default mapping, it overwrites the {visual}S.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!