Advertisement
bzipitidoo

diff for vim syntax highlighting for perl, to use colors instead of \ and "

Apr 21st, 2023
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.41 KB | Source Code | 0 0
  1. 184,186c184,187
  2. < syn match  perlSpecialString  "\\\%(\o\{1,3}\|x\%({\x\+}\|\x\{1,2}\)\|c.\|[^cx]\)" contained extend
  3. < syn match  perlSpecialStringU2    "\\." extend contained contains=NONE
  4. < syn match  perlSpecialStringU "\\\\" contained
  5. ---
  6. > syn match  perlSpecialString  "\\\%(\o\{1,3}\|x\%({\x\+}\|\x\{1,2}\)\|c.\|[^cx]\)" contained contains=perlEsc extend
  7. > syn match  perlSpecialStringU2    "\\." extend contained contains=perlEsc
  8. > syn match  perlSpecialStringU "\\\\" contained conceal cchar=\
  9. > syn match  perlEsc        "\\" conceal contained
  10. 302,303c303,304
  11. < syn region perlStringUnexpanded   matchgroup=perlStringStartEnd start="'" end="'" contains=@perlInterpSQ keepend extend conceal
  12. < syn region perlString     matchgroup=perlStringStartEnd start=+"+  end=+"+ contains=@perlInterpDQ keepend extend conceal
  13. ---
  14. > syn region perlStringUnexpanded   matchgroup=perlStringStartEnd start="'" end="'" contains=@perlInterpSQ keepend extend concealends
  15. > syn region perlString     matchgroup=perlStringStartEnd start=+"+  end=+"+ contains=@perlInterpDQ keepend extend concealends
  16. 515c516
  17. < hi def link perlString            String
  18. ---
  19. > hi def perlString         ctermbg=magenta ctermfg=black
  20. 604c605
  21. < hi def link perlSpecialString     perlSpecial
  22. ---
  23. > hi def perlSpecialString      term=bold ctermfg=green
  24. 626c627
  25. < hi def link perlSpecialStringU2   perlString
  26. ---
  27. > hi def link perlSpecialStringU2   perlSpecialString
  28. 654a656,657
  29. >
  30. > set conceallevel=2
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement