Save as sudo when editing system file as non-sudo

:w !sudo tee %

Can press L to load and see changes (read only)

Special in shell command mode

vim -E

Launch Vim with no settings

vim -u NONE filename.txt

Force filetype for change syntax highlighting

I have a CSS plugin which shows the colors inline, changing files to it activates it

:setfiletype css

My Neovim init.vim

curl -OL
# check the script first! Never run scripts from the internet without checking it!
chmod +x

Show dos line endings (prevents scripts from running on linux)

:e ++ff=unix

Delete dos line endings


CTRL+V, CTRL+M to create ^M