Select entire line in VIM, without the new line character

后端 未结 6 1758
清歌不尽
清歌不尽 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:12

    Yes, g_ is what you are looking for. g_ is like $, but without the newline character at the end.

    Use 0vg_ or ^vg_, depending if you want to copy from the beginning of the line, or the first character on the line, respectively.

提交回复
热议问题