User:Aude/Vim

From MediaWiki.org
Jump to navigation Jump to search

Tips & tricks[edit]

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