On Tue, March 6, 2012 23:33, 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).
Can't you simply transform your syn keywords to syn matches? If I read your syntax highlighting rule correctly, the fortranSerialNumber match should then always take precedence, because it starts at the line beginning. regards, Christian -- 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
