On Jun 22, 2011, at 5:09 PM, Christian Brabandt wrote:

> You've already told as several times, that you are not a 
> programmer. That doesn't mean anything. You don't have to be a 
> programmer to use vim. I myself use vim mainly for writing text 
> and analyzing csv files.

Thanks, Christian. I've felt a need to alert people to the fact that they can't 
take much for granted in trying to help me. It appears I've gotten the point 
across. I'll cut it out.

> And to find out how to use the suggested command, I gave you a 
> hint in the help, where everything is documented. If you had 
> followed the link, it would have explained how to detect the 
> extension as a different filetype. Because that's what it is for 
> vim, a new filetype, that will be treated like another filetypes.

I did read the help you suggested. In fact, I'd read it before you suggested 
it.  And I read it again after you suggested it.

As I understand it, all the variants discussed there have to do with creating a 
new filetype. Again, I don't believe that that's what's called for in this 
case, or that the suggestion I was following up on understood it that way. 

The filetype exists. It is markdown. Vim 7.3 comes with it. It recognizes 
several extents as indicators of the filetype. All that was required was adding 
another extent to the list of those recognized by the filetype.
 
> Let's see what the help tell's us (this is from an older Vim with 
> filetype.txt dated from 07/15/2008):
> 
> ,----
> |                                                  *new-filetype*
> | If a file type that you want to use is not detected yet, there 
> | are four ways to add it.
> `----
> 
> Not exactly what we want, but keep on reading…
> 
> ,----
> |     2. Create a file that contains an autocommand to detect the 
> |     file type.
> |     Example:
> | 
> |       au BufRead,BufNewFile *.mine  set filetype=mine
> | 
> |     Note that there is no "augroup" command, this has already 
> |     been done when sourcing your file.  You could also use the 
> |     pattern "*" and then check the contents of the file to 
> |     recognize it.
> | 
> |     Write this file as "mine.vim" in the "ftdetect" directory in 
> |     your user runtime directory.  For example, for Unix:
> | 
> |     :w ~/.vim/ftdetect/mine.vim
> `----
> 
> I might be missing something, but doesn't that look like what you 
> want?

Well, it looks pretty similar. There is a difference, though I'm not sure it 
makes a difference. In the above, a new filetype is being created. In my 
situation, the filetype already exists. I just want to associate an additional 
extent with it. Perhaps it could have been done this way. 

Earlier, on another thread, I had been discouraged from creating a new 
filetype. I don't remember what the issue was then. It may have been unrelated 
to this situation. In any case, it was in the back of my mind. By 
trial-and-error I ended up with an alternative that works: Putting the command 
in my .vimrc. 

Since inquiring I've been assured that was where it belonged. Whether it is or 
not, I take the fact that it works when put there as corroboration of the 
belief that creating a new filetype is not the only way of solving the problem.

> If you know nothing, may I suggest, that you start reading at the 
> help references that you have been given? Nobody here knows 
> everything about vim, but it is pretty good documented, so start 
> using the documentation.

I do read the documentation, especially when it's suggested. The fact that it's 
so well documented, from so many different sources, is one of the things that's 
attractive about Vim. 

I don't know about you, but for me there's a learning curve in learning to use 
the documentation. I'm more capable of using than I was. I will get better. But 
the documentation, especially that it the help files, is not transparent.  
Often it does not help me because I need help in interpreting the help. As in 
deciding whether the solution to my problem was in creating a new filetype. I 
judged that it wasn't. For sure it's not the only one.

Thanks for making me think. I like to think I've learned something as a result. 
Not sure at the moment that I can say what it is. Perhaps just to stop saying I 
don't know anything. I guess from my response I must think I do think I know 
something. 

Sincerely,
------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA  USA
eew...@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

Reply via email to