Sunday, September 25, 2011

Re: Remembering syntax when moving in and out of buffers

On Sep 25, 2:42 pm, "Benjamin R. Haskell" <v...@benizi.com> wrote:
>
> > What does using option filetype buy you when you do use the normal
> > filetype detection mechanism ? One advantage I can see is that it
> > makes it easier to use plugins by other people. But if you're using a
> > file type of your own does using the filetype option offer you
> > anything ?
>
> Only consistency.  Putting commands in one file
> (~/vim-scripts/myfile.vim) or another (~/vim-scripts/syntax/myfile.vim)
> shouldn't be *that* much of a hassle.  And if you do it the way other
> filetypes do it (use the standard filenames), it happens the same way
> (they get loaded when they're needed).
>
> But, if you *really* don't use other filetypes, and disable the filetype
> detection mechanism anyway, there's no point to that consistency, since
> it's unused.  So, the answer is "nothing".  There's nothing better about
> doing it the right way when you disable all but your custom filetype(s).
>

I think the big thing it buys you, is the ability to easily expand
your Vim with filetype-specific plugins, etc. which will "just work"
on any "normal" Vim setup.

These filetype-specific plugins, and some global plugins even, rely on
a properly set 'filetype' option to work as intended.

--
You received this message from the "vim_use" 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

No comments: