open vim with syntax off

Avi Greenbury avismailinglistaccount at googlemail.com
Mon Jan 10 22:37:40 UTC 2011


Linda wrote:
> Is there a way to make vi open with syntax off by default 
> instead of with syntax on?


If it's the default you want to set, you need to edit your .vimrc file,
which will be in your home directory. If you do 

vim ~/.vimrc

You should find yourself presented with an empty file. Write

syntax off

and save and exit. The next time (and each time thereafter) you open
vim, syntax will be off. ~/.vimrc is your personal vim config file. In
much the same style as ~/.bashrc, it's basically a list of vim commands
to execute on startup. It's executed after /etc/vim/vimrc, which is the
global one. 

-- 
Avi




More information about the ubuntu-users mailing list