Command Effect
:set ic ignore case while searching
/
:w
:g/
dd delete line
dw delete word
d) delete rest of sentence
yy yank/copy line
p paste (from copy or delete)
wq save and quit
q! quit without saving
#G go to line #
G go to the last line in a file
:g/^$/d delete empty lines
:g/
mx mark beginning of a block "x"
d'x cut from beginning of block "x" to cursor
:%s/find/replace/ replace every occurance of the word "find" with "replace"
If you're scanning through logs with a lot of redundant information in them, it's often handy to use the pattern matching line delete from above, that way you can get rid of a lot of the extra fluff that you're sure you won't need.
No comments:
Post a Comment