vi - In Vim, what is the best way to select, delete, or comment out large portions of multi-screen text? -
selecting large amount of text extends on many screens in ide eclipse easy since can use mouse, best way e.g. select , delete multiscreen blocks of text or write e.g. 3 large methods out file , delete them testing purposes in vim when using via putty/ssh cannot use mouse?
i can yank-to-the-end-of-line or yank-to-the-end-of-code-block if text extends on many screens, or has lots of blank lines in it, feel hands tied in vim. solutions?
and related question: there way somehow select 40 lines, , comment them out (with "#" or "//"), common in ides?
well, first of all, can set vim
work mouse, allow select text in eclipse
.
you can use visual selection - v, default. once selected, can yank
, cut
, etc.
as far commenting out block, select visual
, do
:'<,'>s/^/# /
replacing beginning of each line #
. (the '<
, '>
markers beginning , and of visual selection.
Comments
Post a Comment