This shows you the differences between two versions of the page.
simple_vi_vim_handling [2011/10/15 08:12] root |
simple_vi_vim_handling [2012/01/12 12:39] (current) root |
||
---|---|---|---|
Line 27: | Line 27: | ||
Change all appearances of from to morf from line 1 to current line: | Change all appearances of from to morf from line 1 to current line: | ||
:1,.s/from/morf/g | :1,.s/from/morf/g | ||
+ | |||
+ | ===== VIM - Comment blocks of code (visual mode) ===== | ||
+ | |||
+ | Mark the area which is to be commented using the *blockwise* visual mode (CTRL-V)\\ | ||
+ | Press I (capital i) and write the text you want to prepend to each line of the selected block, e.g. %.\\ | ||
+ | Then press ESC and the text will be inserted to the left of each line of the selected block. | ||
+ | |||
+ | ===== VIM - Select line(s) (visual mode) ===== | ||
+ | |||
+ | Shift + v | ||
+ | |||