This shows you the differences between two versions of the page.
simple_vi_handling [2011/06/01 12:58] 127.0.0.1 external edit |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Simple vi handling ====== | ||
- | |||
- | ===== Line numbers ===== | ||
- | |||
- | |||
- | Show line numbers: | ||
- | :set nu | ||
- | |||
- | "Unshow" line numbers: | ||
- | :set nonu | ||
- | |||
- | ===== Search and replace ===== | ||
- | |||
- | Current line = . | ||
- | |||
- | Insert comment character on current and next 5 lines: | ||
- | :.,+5s/^/#/g | ||
- | |||
- | Change all appearances of from to morf from line 1 to current line: | ||
- | :1,.s/from/morf/g | ||