[slim-vim] The "right" way of doing file specific things in vim
Larry Clapp
larry at theclapp.org
Tue Aug 8 07:20:10 CDT 2006
On Sat, Aug 05, 2006 at 10:30:26AM -0700, Brad Beveridge wrote:
> On 05/08/06, Daniel Trstenjak <Daniel.Trstenjak at online.de> wrote:
> > I looked in the implementation of ecl-slime.vim and saw the
> > autocommands for loading a lisp file.
> >
> > I don't know if you are aware of the vim filetype plugins ?
> >
> > The filetype plugins in vim are used to do specific
> > stuff when loading files of a specific type.
> >
> > What is done when loading a lisp file can be
> > seen in "vim-runtime-path/ftplugin/lisp.vim".
> >
> > When you want to do more than in the vim standard
> > filetype plugin you can put an own filetype plugin
> > in "$HOME/after/ftplugin/lisp.vim". This one
> > will be loaded after the standard one.
> >
> > To activate filetype plugins you have to put
> > "filetype plugin on" in your vimrc.
> >
> > The same is also available for indentation:
> > "vim-runtime-path/indent/lisp.vim"
> >
> > To activate the indentation:
> > add "filetype indent on" in your vimrc
>
> Hi Daniel, thanks for the feedback. To be honest, I am no expert an
> Vim script - Larry made the changes to enable the autocommands. I
> really don't understand it that well at all. If you and Larry can
> agree on a better way to do any of that stuff, I'll be happy for it
> to go in.
Daniel / Brad,
I started using Vim late in v3 (I think), before the addition of the
$HOME/.vim/* tree, so I know about it, but it's not the first place I
think of. Mea culpa.
Please feel free to submit diffs or patches, or I'll fix it when I
can.
> At the moment my pet peeve is that if I start Vim by editing a lisp
> file and then source ecl-slime.vim, they keymappings aren't active
> for the already open file until I issue the :e! command.
I agree. Again, I'll fix it when I can, or someone can submit diffs
or patches.
-- Larry
More information about the slim-vim
mailing list