On Wednesday 06 July 2005 05:35, roberto wrote:
> --- Hans du Plooy <[EMAIL PROTECTED]> ha scritto:
> > You can enable syntax highlighting for vim by editing /etc/vim/vimrc
> > look for the line:
> >
> > " syntax on
> >
> > and uncomment it.Then look in the
> > file /usr/share/vim/vim63/syntax/syncolor.vim and other files in that
> > directory to configure the actual highlighting to your liking.
>
> yes, but probably my point is more about something like pattern matching
> than syntax highlighting; i mean, it is possible with emacs to place the
> cursor over an "end" of the code, for example, and then the editor
> automatically highlights the matching "for" or "if" depending on the case;
> this is really useful when you are reading the code of someone else and
> moreover the matching "for" or "if" is 10 or 20 lines above
>
> how to achieve this in vim?
>
> thanks :)
>

matchit [1]


Hmm. I do not know how to highlight the beginning and end of such statements, 
But, using matchit, pressing % cycles between the beginning and end of 
conditionals and loops in my bash scripts (e.g., between for <-->done, or if 
<--> fi)--conditionals and loops that use no braces.

You might need to edit a matchit config. The Maple V script does this, so 
maybe by looking through its ftplugin/maple.vim, you can modify it for 
matchit.[2]

I don't know if you have already searched the Vim tips site, but there are two 
other vim scripts for matlab.[2][3] (Both say MatLab is supported in vim7.)

[1] http://vim.sourceforge.net/scripts/script.php?script_id=39
[2] http://vim.sourceforge.net/scripts/script.php?script_id=1274
[3] http://vim.sourceforge.net/scripts/script.php?script_id=1273

Attachment: pgpjKNQsh7n5i.pgp
Description: PGP signature

Reply via email to