Skip to main content
Made it more clear what :h syn-keyword is doing. Small grammar corrections.
Source Link

The problem in your case is, that the syntax highlighting script for your package usesdefines a keywordkeyword (enter :h syn-keyword for more details) and that always has priority before any of the syn-match or syn-region rules.

In your case, I would therefore simply use a matchadd() call like this:

 :call matchadd('Conceal', 'package', 10, 99, {'conceal': 'p'})
 :set conceallevel=2 concealcursor=nv

this needsThis requires a relatively new Vim version (I don't remember the exact patch level, but a 7.4.700 should work)

The problem in your case is, that the syntax highlighting script for package uses a keyword (:h syn-keyword) and that always has priority before any of the syn-match or syn-region rules.

In your case, I would therefore simply use a matchadd() call like this:

 :call matchadd('Conceal', 'package', 10, 99, {'conceal': 'p'})
 :set conceallevel=2 concealcursor=nv

this needs a relatively new Vim version (I don't remember the exact patch level, but a 7.4.700 should work)

The problem in your case is that the syntax highlighting script for your package defines a keyword (enter :h syn-keyword for more details) and that always has priority before any of the syn-match or syn-region rules.

In your case, I would therefore simply use a matchadd() call like this:

 :call matchadd('Conceal', 'package', 10, 99, {'conceal': 'p'})
 :set conceallevel=2 concealcursor=nv

This requires a relatively new Vim version (I don't remember the exact patch level, but a 7.4.700 should work)

Source Link
Christian Brabandt
  • 26.5k
  • 1
  • 54
  • 80

The problem in your case is, that the syntax highlighting script for package uses a keyword (:h syn-keyword) and that always has priority before any of the syn-match or syn-region rules.

In your case, I would therefore simply use a matchadd() call like this:

 :call matchadd('Conceal', 'package', 10, 99, {'conceal': 'p'})
 :set conceallevel=2 concealcursor=nv

this needs a relatively new Vim version (I don't remember the exact patch level, but a 7.4.700 should work)