Tag Archives: vim

Linux : Vi and Vim Short Notes

Writing to file when your forgot to run Vi/Vim as root privileges.
:w !sudo tee %

Searching in Vi/Vim.
:%s///g

Copy and paste line in Vi/Vim.
[Esc] yy -
p - paste after cursor
P - paste before cursor

Reference:-
http://vim.wikia.com/wiki/
http://stackoverflow.com/

Advertisements