Tuesday, January 26, 2010

Re: FIXME syntax highlighting.

2010/1/26 Stroller <stroller@stellar.eclipse.co.uk>:
> Hi there,
>
> I joined this group because I've been trying to use vim more seriously for
> about a month or so now, but every problem I have encountered to date I have
> been able to resolve with Google. Today, Google has let me down.
>
> After searching for something, I typically type "/frhfurhfuhru" in order to
> clear the search string, because I find the bright yellow highlighting
> distracting.

I use the following mapping to make this easier:

nnoremap <ESC> :noh<CR><ESC>

This makes <ESC> in normal mode switch off the highlighting.

> Today I added a "FIXME" comment to some code and found it highlighted the
> same bright yellow. "/irurhgfr" does not clear the highlighting, and have
> discovered the /usr/share/vim/vim72/syntax/ directory as the culprit.
>
> The documentation [1] shows that "syn clear perlTodo" will clear this
> highlighting for the current programming language, and presumably I can put
> it in my .vimrc and never be bothered again when writing Perl.
>
> Is it possible to clear the syntax highlighting for ALL *Todo types, without
> having to list "javaTodo", "pamconfTodo", "groovyTodo", ... individually?

To track this one down, you can do:

:syn list perlTodo

This will report:

--- Syntax items ---
perlTodo xxx contained XXX TBD FIXME TODO
links to Todo

This tells you that perlTodo links to the overriding Todo group (which
will also contain all the other Todo highlighting groups), so you can
get rid of Todo highlighting with:

syn clear Todo

Hope that helps.

Al

--
http://sites.google.com/site/abudden

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

No comments:

Post a Comment