danabble wrote:
Syntax highlighting is the reason that I switched from emacs to vi.
(I got tired of having to set all kinds of things just to get decent
syntax highlighting by default on a new machine.)
In general, the vim syntax highlighting is fantastic, and well worth
the switch.
But there is a use case that is not covered and I don't know how to
change it:
Keywords that extend beyond the column limit in fortran.
:help :syn-priority says this:
When several syntax items may match, these rules are used:
1. When multiple Match or Region items start in the same position, the item
defined last has priority.
2. A Keyword has priority over Match and Region items.
3. An item that starts in an earlier position has priority over items that
start in later positions.
It's numbers 2 and 3 which cause me trouble. The problem is, to the
compiler, the 72-character limit is absolute (in fixed-form fortran);
but to vim syntax rules, the keyword highlight has priority (rule 2)
and a word of any sort (keyword or match) that starts before position
72, but extends after 72 has priority (rule 3).
Is there a way to have syntax highlighting region-like rule that takes
precedence over everything else? Because it does to the compiler.
Here's a couple of suggestions:
* set cc=80
* match Error /\%>79c.*$/
Neither of these are syntax rules, admittedly.
Regards,
Chip Campbell
--
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