From: BG - Ben Armstrong <BA<rmstrong@dy...> - 2004-10-29 14:15:59
My filetype plugins aren't working with cream, even though they work
I have two ftplugin files, task.vim and basic.vim, which override
shiftwidth, softtabstop, and comments. These are in the ftplugin subdir
of /etc/vim/, which is a symlink to /usr/share/vim/vimfiles/. My
runtimepath as shown by "set runtimepath" is as follows (wrapped for
I also have my own scripts.vim that does filetype detection by content,
since our old homegrown revision control unfortunately uses the file
extension ".new" to indicate the working copy of the file, regardless of
the original filetype. So file extension matching won't work. Thus in
my own /etc/vim/scripts.vim I have:
elseif s:line1 =~ '^\d.\+[pP][rR]:'
This clearly is functioning properly because I see the filetype set in
the status bar, and the /etc/vim/syntax/task.vim is loaded. However, I
know /etc/vim/ftplugin/task.vim is not loaded because the tab & comments
settings are not set.
I had formerly kludged all of these settings into the syntax files for
each of these file types. This worked. But now that I have correctly
separated these settings into the ftplugin files, I can't figure out how
to get cream to use them. Here is an example ftplugin file task.vim:
" Vim filetype plugin file
" Language: task
" Maintainer: Ben Armstrong <BArmstrong@...>
" Last Changed: 2004 Oct 28
" URL: http://www.dymaxion.ca/
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
" Undo the stuff we changed.
let b:undo_ftplugin = "setl sw< sts< com<"
Get latest updates about Open Source Projects, Conferences and News.