open vim with syntax off

Smoot Carl-Mitchell smoot at tic.com
Mon Jan 10 23:46:22 UTC 2011


On Mon, 2011-01-10 at 17:29 -0600, Linda wrote:
> > 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.
> >
>   Thank you. This was exactly what I needed.  I'll have to 
> look into vim to learn more about it's features instead of 
> just pretending it is vi.

You can also start it without reading any of the initialization files
(.vimrc, /etc/vim/vimrc) like this:

vim -u NONE  file

-- 
Smoot Carl-Mitchell
System/Network Architect
voice: +1 480 922-7313
cell: +1 602 421-9005
smoot at tic.com





More information about the ubuntu-users mailing list