[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-devel
Subject: Re: vim filetype off
From: Graham Percival <graham () percival-music ! ca>
Date: 2010-07-27 19:52:36
Message-ID: 20100727195236.GA29658 () sapphire
[Download RAW message or body]
On Tue, Jul 27, 2010 at 12:32:30PM -0700, Patrick McCarty wrote:
> On 2010-07-27, Graham Percival wrote:
> > On Tue, Jul 27, 2010 at 11:15:36AM -0700, Patrick McCarty wrote:
> > > On Tue, Jul 27, 2010 at 10:49 AM, Graham Percival
> > > <graham@percival-music.ca> wrote:
> > > > Why on earth do we have a
> > > > filetype off
> > > > set runtimepath
> > > > filetype on
> > > >
> > > > in the suggested .vimrc ? Those lines should be unnecessary.
> > >
> > > Basically, if I remove the "filetype" lines, the "set runtimepath"
> > > occurs too late in the filetype detection sequence to have any effect.
> > > By turning off filetype detection, modifying the runtimepath, and
> > > re-enabling filetype detection, the new runtimepath will be
> > > recognized.
> >
> > Hmm. I'd prefer doing
> > set runtimepath+=
> > syntax on
> > since that's IMO more understandable. According to that thread,
> > it will have the same effect.
>
> That doesn't work for me, unfortunately.
>
> Sourcing $VIMRUNTIME/vimrc_example.vim executes
>
> syntax on
> filetype plugin indent on
>
> which means that the runtimepath has already been searched before any
> commands in ~/.vimrc are executed.
>
> Looking into this a bit more, I found another incantation that works:
>
> set runtimepath+=/path/to/lilypond/current/vim
> runtime! ftdetect/lilypond.vim
>
> Would you prefer this over the filetype off/on version?
Mao. When I read that "syntax on" called "filetype on"
internally, I assumed that it would reload the directories, but
apparently not.
Huh. It also depends on whether you have a system-wide vimrc that
contains "syntax on"... debian doesn't, but I'm guessing that
ubuntu/redhat/etc would. Or at least, they /might/, so we can't
rely on them not having this.
ok, let's keep the
filetype off
set runtimepath+=
filetype on
version. People might wonder about it, but it's safe and works.
Maybe some later version of vim will fix the runtimepath issue. :(
Cheers,
- Graham
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic