In Vim, what is the best way to select, delete, or comment out large portions of multi-screen text?

前端 未结 16 1216
醉话见心
醉话见心 2021-01-31 09:43

Selecting a large amount of text that extends over many screens in an IDE like Eclipse is fairly easy since you can use the mouse, but what is the best way to e.g. select and de

16条回答
  •  悲哀的现实
    2021-01-31 10:08

    v enters visual block mode, where you can select as if with shift in most common editors, later you can do anything you can normally do with normal commands (substitution :'<,'>s/^/#/ to prepend with a comment, for instance) where '<,'> means the selected visual block instead of all the text.

提交回复
热议问题