Some useful commands to work with vi
i | insert |
r | replace |
9yl | copy nine characters from cursor position, e.g 192.168.1.0 192.168.1 will be copied |
p | paste what you have copied |
x | delete character |
:wq | write and quit (save and close) |
/search_string | find search_string |
n | go to next occurrence of search_string |
N | go to previous occurrence of search_string |
dd | delete line |
10dd | delete next 10 lines |
yy | copy line |
10yy | copy next 10 lines |
r | replace current character at cursor |
R | replace current word at cursor |