On Sat, May 26, 2012 at 05:54:32AM -0400, Eric Weir wrote:

> On May 25, 2012, at 7:03 PM, sc wrote:

> > when you start with an empty window, you have done nothing to
> > tell vim what type of file you are going to create -- when you
> > add text it still doesn't know -- if you write the file with a
> > markdown extent, it COULD know if you would ask it to check
> > (writing doesn't trigger filetype detection) -- so to ask it you
> > might try something like
> > 
> >    :syntax enable
> > 
> > perhaps that will help?

> Thanks, sc. Definitely does. I assumed the behavior was anomalous.
> Someone, I think Chris, suggested earlier that a simple ":e" would
> do the trick, and it seems to do so. 

as in perl, TMTOWTDI (there's more than one way to do it) -- many
others have been suggested in this thread

> [Is that a shortened version of the command you suggest?]

no, :e is shorthand for :edit, which reloads the buffer and triggers
filetype detection along the way

the bad news is you've just implied you don't know how to use vim's
extensive help system (or maybe you're intimidated by it?)

    :h :e

would have answered that for you -- i recommend spending some time
familiarizing yourself with the help system -- learn about helpgrep,
and try it out with

    :helpgrep filetype detection

there are about 24 hits on that specific string, and will take you to
many interesting places in Help as you :cn your way through them

sc

-- 
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

Reply via email to