Saturday, May 26, 2012

Re: Folding on markdown headers

On Sat, May 26, 2012 at 1:54 AM, Eric Weir <eeweir@bellsouth.net> wrote:
>
> 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. [Is that a shortened version of the command you suggest?]
>

:e is essentially equivalent to "file open" in other editors -- so
when you use the command :e without a file name it opens (reloads) the
current file (see more on the command using :help :e)

What you are running into is that Vim has no way to automatically knew
the filetype of your file unless it can do so by recognizing the file
extension (or a modeline at the beginning or end of a file). So when
you start a new file and save it with the proper extension, the :e
reloads the file, recognizes the type, and Vim acts accordingly. In
other words, it does the same thing that you are doing when you set
the filetype automatically...

c
--
Chris Lott <chris@chrislott.org>

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