4271Re: Using filetype plugin for plist file
- Jan 14, 2007* listuser (2007-01-15):
> Thank you for your replay, but actually it does not really help.[...]
> :he autocommand is far over 1200 lines long and I do not really know, what i am supposed to get out of it to answer my question.
> I know how to use 'autocmd BufReadPre,FileReadPre', in a script in the plugin directory but I'd prefer to use a ftplugin.
> Any suggestions?
> >>I have a plugin which I want to use as a filetype plugin for binary plist files (e.g. the ones locatet in ~/Library/Preferences).Martin, no top-posting please. This works for me:
> >>I have "filetype plugin indent on" in my .vimrc file.
> >>The plugin works correctly when i put it into ~/.vim/plugin/plist.vim but of course it is loaded for any filetype.
> >>When I put it into ~/vim/ftplugin/plist.vim ist is not loaded when editing plist files.
> >>What do do I have to do, to make vim load my plist.vim file when I edit a file with the suffix .plist?
> >>I have read ":help add-filetype-plugin" I still can't figure it out.
> >:he autocommand
exe "source " . SOURCEME
" treat .plist as xml
au BufRead,BufNewFile *.plist set filetype=xml
- << Previous post in topic Next post in topic >>