User:Aude/Vim

Tips & tricksEdit

Tip Code
delete lines to the end of a document
:+,$d

disable autocmd

:noautocmd wq
save as sudo
:w !sudo teeĀ %
quit from git commit messsage prompt without committing
:cq
determine current encoding
:set encoding?
set encoding
:set encoding=utf8
determine current file encoding
:set fileencoding?
set file encoding
:set fileencoding=utf8