This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
vim [2012/04/26 12:40] k2patel [VIM] |
vim [2017/09/29 15:15] k2patel [Saving file as root] |
||
---|---|---|---|
Line 97: | Line 97: | ||
l. if in doubt, press "Esc" | l. if in doubt, press "Esc" | ||
</code> | </code> | ||
+ | |||
+ | [[http://www.infobound.com/vi.html | Ref.]] | ||
==== File Cleaning ==== | ==== File Cleaning ==== | ||
Line 181: | Line 183: | ||
</code> | </code> | ||
+ | ==== Quick tools ==== | ||
+ | Comment line from current line. | ||
+ | <code bash> | ||
+ | :.,$s/^/#/g | ||
+ | </code> | ||
==== Marking ==== | ==== Marking ==== | ||
<code vim> | <code vim> | ||
Line 255: | Line 261: | ||
^ - move to the beginning of the line | ^ - move to the beginning of the line | ||
`m - move to the location of mark m | `m - move to the location of mark m | ||
- | G - move to the end of the file | + | G - move to the end of the file |
+ | gg - move to the beginning of the file | ||
) - move forward 1 sentence | ) - move forward 1 sentence | ||
H - move to the top of the display | H - move to the top of the display |