vi editor is great even trough ssh sessions!
vicommand is usually an alias or symbolic link to the vim program.
If you type a number before any of these commands, then the command will be executed that many times. This number is called a repetition count or simply count. For example, 5h will move left five characters. You can use repetition counts with many vi commands.
When you want to write and exit from a file consider you permissions, the bellow command write out the current file using sudo::w !sudo tee %
- :w – Write a file (actually buffer).
- !sudo – Call shell with sudo command.
- tee – The output of write (vim :w) command redirected using tee.
- % – The % is nothing but current file name.
:help keywordand vim will open help for keyword.