Hi Gary

Took your advice and RTFM'D ;-)

Had a look in usr/share/vim/vimrc

'set compatible' was uncommented in there. Not a default setting it seems.
Must have come over from my colleagues PC when we copied Vim over

So when I put 'nocompatible' in .vimrc it over rode this and snipmate worked

funny thing is it didn't work a few days later when I tried to use it again.

So removed nocompatible from .vimrc and commented out set compatible
in usr/share/vim/vimrc and now snipmate works again :)

Thanks for your help


On Tue, Oct 9, 2012 at 4:03 AM, Gary Johnson <[email protected]> wrote:

> On 2012-10-08, Mashan wrote:
> > Thanks Gary / Marc / Charles
> >
> > Turns out putting "set nocompatible" into the .vimrc file did the
> > trick (Thanks Marc)
>
> I'm glad that problem has been fixed, but I would be wary of that
> solution for two reasons.  First, it shouldn't be necessary.  As
> ":help 'compatible' explains,
>
>         When a |vimrc| or |gvimrc| file is found while Vim is
>         starting up, this option is switched off, and all options
>         that have not been modified will be set to the Vim defaults.
>
> So, 'nocompatible' should already have been set by the time your
> ~/.vimrc was read.
>
> Secondly, again from ":help 'compatible',
>
>         This is a special kind of option, because when it's set or
>         reset, other options are also changed as a side effect.
>         CAREFUL: Setting or resetting this option can have a lot of
>         unexpected effects: Mappings are interpreted in another way,
>         undo behaves differently, etc.  If you set this option in
>         your vimrc file, you should probably put it at the very
>         start.
>
> By putting "set nocompatible" into your ~/.vimrc where you did,
> you've thrown a monkey wrench into your initialization process.
> While it did have the effect of fixing this problem, it may well
> have caused other problems that you haven't discovered yet.
>
> Since: a) this fixes this problem; b) hasn't had any bad
> side-effects yet; and c) I don't know what the real solution is; I'd
> leave your ~/.vimrc as-is.  Just be aware that this is a flaky
> solution, may cause other problems, and removing it should be one of
> the first things you do if you have problems in the future.
>
> > This worked on it's own without any of the "filetype" settings,
> > though as you'll see below I put them in anyway as I had heard
> > they were important (possible for other reasons ?)
>
> The ":filetype ident plugin on" and ":syntax on" commands were
> already executed in your /usr/share/vim/vimrc file.  That's why you
> didn't need to set them in your ~/.vimrc file.  That can be seen in
> the output of :scriptnames that you posted earlier.
>
> > Thanks again for everyone's help
> >
> > Much appreciated
> >
> > contents of .vimrc file :
> >
> > set ts=4
> > set ai
> > set shiftwidth=4
> > syn on
> > set mouse=a
> > au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery
> > color evening
> > filetype on
> > set tabpagemax=25
> > set smartindent
> > set showmatch
> > set vb t_vb=
> > set ruler
> > set incsearch
> > set nocompatible
> > au BufRead,BufNewFile *.php set ft=php.html
> > filetype plugin on
> > filetype indent plugin on | syn on
>
> Regards,
> Gary
>
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to