Select entire line in VIM, without the new line character

后端 未结 6 1642
清歌不尽
清歌不尽 2020-12-23 16:57

Which is the shortest way to select an entire line without the new line character in VIM?

I know that SHIFT + v selects the entire line

6条回答
  •  有刺的猬
    2020-12-23 17:14

    0v$
    ^v$
    0vg_
    ^vg_
    $v0
    $v^
    g_v0
    g_v^
    

    all do the job with different conceptions of what a line is (from first column or from first printable character, to last character or to last printable character). You can create a custom mapping if you like.

    Note that selecting text is often unnecessary in vim.

提交回复
热议问题