Usefull vi commands

Some usefull 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
dd                              delete line
10dd                          delete 10 lines
yy                              copy line
10yy                          copy 10 lines