* Matt Wozniski <[email protected]> [100203 06:58]: > On Wed, Feb 3, 2010 at 12:14 AM, Tim Johnson wrote: <..> > See :help new-filetype, but the problem is basically just caused by > you using ":setf newlisp" instead of ":set filetype=newlisp". What > actually going wrong for you is that your check was coming after the > default checks, by which point *.lsp had already been recognized by > one of the default checks, which did ":setf lisp". Then, your autocmd > fired, and ":setf newlisp" didn't do anything because 'ft' had already > been set. <...> > You hacked around the problem by forcing your autocmds to be defined > before the filetype autocmds, but not in a reliable way - that will > break if your distro turns on syntax highlighting in the systemwide > vimrc, for example. The better solution would be to use ":set > filetype=newlisp" in the autocmd instead, or to use one of the file > based approaches documented at :help new-filetype . If you use :set > filetype=newlisp, the order won't matter. Either your filetype choice > will get set first, and the normal checks will refuse to override it, > or the normal checks will set it first, and then your autocmd will > override it. <...> Thank you Matt, for both the correct solution and the explanation! -- Tim [email protected] http://www.akwebsoft.com
-- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php
