On 07/06/11 17:19, ANDY KENNEDY wrote:
<snip>
au BufNewFile,BufRead Kconfig.* call
s:StarSetf('kconfig')
In stead?
If you know of a fix for this, please pass it along to me.
To start with, never modify any file under $VIMRUNTIME. It may be
overwritten by an update to Vim within the same revision (e.g.,
7.3.x) and will be ignored if you update Vim to a new revision
(e.g., 7.2 to 7.3).
Only, however, if _I_ update it. I don't use a flavor of Linux
that self updates.
Yes, but you won't stay your whole life with this same version of Vim,
never even applying a bugfix, will you? So when (not if) you upgrade,
any upgrade may silently owerwrite anything at any depth in the
$VIMRUNTIME directory tree. And when (not if) it does, which will be no
later (and perhaps earlier) than Vim 7.4 or 8.0 (whichever happens
first), you'll be very surprised to see that whatever changes you had
applied have now gone in smoke.
User customizations should go in the _other_ directory trees listed in
the 'runtimepath' option, as follows:
$VIM/vimfiles/ and $VIM/vimfiles/after/ for system-wide customizations
on any platform
$HOME/.vim/ and $HOME/.vim/after/ for single-user customizations on
Unix-like systems including Linux, Mac OSX, etc.
$HOME/vimfiles/ and $HOME/vimfiles/after/ for single-user customizations
on DOS-like systems including Windows.
all these paths as seen from inside Vim. These directories are not
modified by any upgrade; they (and any of their subdirectories) don't
need to exist unless you have something to place in it; and each of
these trees' layout is the same as that of $VIMRUNTIME.
If Vim's decision about the type of a particular file is not what
you want, there are two standard solutions described under
:help new-filetype
sections A and C. Which method you should choose depends on the
number of filetype rules you intend to add or modify. If the
number
is small, section A, using a file under ~/.vim/ftdetect is easier.
If the number is large, section C, creating your own
~/.vim/filetype.vim is probably better. For method A, your
~/.vim/ftdetect/kconfig.vim file would look like this:
au BufRead,BufNewFile Config.in set filetype=kconfig
::sighs:: This worked. I don't understand why this works, however.
Is this because these commands are post processed, and (for some
reason) are evaluated before the defaults? If that is the case,
then I understand why it picks up the filetype correctly.
<snip>
HTH,
Gary
Yes it did help, Thank you so much.
Andy
Best regards,
Tony.
--
Give thought to your reputation. Consider changing name and moving to
a new town.
--
You received this message from the "vim_dev" 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