> If you were to open an arbitrary file with Vim, could you tell by
> looking at it whether it contained markdown? If so, how? Can you
> describe to someone else how to recognize the contents as markdown?
> If so, then Vim can probably be told to recognize it, too, and all
> you have to do is put that description in ~/.vim/scripts.vim. It
> doesn't have to be an exhaustive description. What you want to find
> is a simple rule or pattern or test that can be evaluated to
> answer, yes or no, is the content of this file markdown?
Thanks Gary,
There is one feature, unrelated to markdown, that all the files in question would have: at least one CamelCase name. I have no idea how to convert that into a rule, though I imagine you guy's could do it in a snap.
I think the better route is going to be the one offered by Thilo and Tony -- using the path to the files to define the filetype. I've taken a stab at how that might be done in my response to Tony. Your explanation leads me to think that I will have to create a script and put it where you said to put it.
I assume scripts.vim can contain multiple scripts?
------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA USA
eeweir@bellsouth.net
--
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:
Post a Comment