vim
Stupid Mouse Click
echo "set mouse-=a" >> ~/.vimrc
Forgot to open as Sudo?
If you’ve opened vim, but forgot to sudo and now can’t save the file, you can do it from inside of vim
:w !sudo tee %
or
:w !sudo tee % > /dev/null
Color Syntax
If you are working in VIM and want syntax highlighting enabled or disabled you simply type:
:syntax on
or
:syntax off
This can be set as default on or off in your ~/.vimrc config file.
What does Syntax Highlighting Look Like?
Here is a side by side comparison of bash script highlighting:
VIM Syntax Help
If you want the actual 5,432 page manual that defines where the syntax files are, how to fidget with them, etc, you can always look at the docs:
:help syntax