A PLSQL Label uses this syntax <<LABEL_NAME>> How can I highlight everything inside and including the opening and closing angle braces?

I've tried the following:

syn match  PLS_label "/[<<].*[>>]/"
syn match  PLS_label "/[<][<].*[>][>]/"
syn match  PLS_label /[<<].*[>>]/
syn match  PLS_label /[<][<].*[>][>]/

You don't need to use a character class around <, and you should probably not use a greedy .* match (would break on <<Label1>> <<Label1>>).

This worked for me:

syntax match PLS_label "<<[^>]\+>>"

(though you only get colors if you use a highlight command on PLS_label).

OP points out a region using << and >> as start and end is also possible.

  • 1
    see also :help syn-region. Thus, syntax region PLS_label start="<<" end =">>" – zundarz May 13 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.