On 2009-11-04, James Vega wrote:
> On Tue, Nov 03, 2009 at 11:02:38PM -0800, Gary Johnson wrote:
> > On 2009-11-04, Parker Jones wrote:
> > > Recently, I wanted to change the syntax highlighting language, but even 
> > > after
> > > spending 15 minutes reading the documentation I got fed up and gave up.  
> > > It
> > > really shouldn't be that hard.  A menu-driven interface could solve this 
> > > by
> > > just letting the user pick out settings from a list and likewise choose 
> > > from
> > > possible values.
> > 
> > I don't see how a menu-driven interface will help with this.
> > Writing syntax highlighting rules is more akin to writing a program
> > than it is to choosing option settings.
> 
> I think this is referring to changing the filetype for a buffer, not
> changing the syntax highlighting rules.

OH.  I see now.  Thanks.

If that's the case, then executing

    :set ft=<filetype>

where the set of <filetype> values can be found from

    :!ls $VIMRUNTIME/syntax

seems pretty simple to me.  Yes, I realize that's not nearly as
clear and straightforward as selecting the file type from a menu,
but a user should very rarely need to select the file type manually;
Vim should almost always be able to determine the file type
automatically.

If Vim is not able to determine the correct file type automatically,
the proper solution is to give it better guidance in the user's
~/.vim/filetype.vim, not require the user to set the file type
manually every time he opens such a file.

Regards,
Gary



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui