I have been trying to get through the syntax file documentation on vim help,
https://vimhelp.org/syntax.txt.html#%3Asyn-files
but it's quite the read and I figured someone here may know how to go about what I'm trying to do.
I do most of my note taking in vim. I have made a simple syntax file for better organizing my thoughts but I'm looking to expand it as I only get two colors at the moment. This is my current file:
if exists("b:current_syntax")
finish
endif
syn match keywordObject "=="
syn match keywordObject "\["
syn match keywordObject "\]"
syn match keywordObject "]=="
syn match keywordIfFalse "=="
syn match keywordIfTrue "::"
syn match keyworActor "--"
syn match keywordAs "*"
syn match comment "#.*$"
let b:current_syntax = "notes"
hi def link keywordObject Keyword
hi def link keywordIfFalse Keyword
hi def link keywordIfTrue Keyword
hi def link keywordActor Keyword
hi def link keywordAs Keyword
hi def link comment Keyword
This lets me organize my thoughts better as I use Lines of ==, --, or :: to divide my notes into sections. Bullet points *, are also colored.
I would like to squeeze some additional functionality out of this, and also get more color as everything but the comments are the same yellow color.
Ideally:
!! Text surrounded by exclamation marks colored bright red to mark importance !!
?? Text surrounded by question marks colored bright pink to mark questions ??
//
Text encased by slashes as light green to mark a misc
idea that's interesting and loosely relevant, but can
be ignored if reading notes for review
\\
* Bullet points (just the bullet not the following text) as
light yellow to further be distinguished
But I am not too picky about what the colors are if there is a limitation, I would just like a bit more variety. Thanks to any help. I would like this to be achieved through just a .vim syntax file and without any plugins.
_vimrc
mapping but the following syntax highlights text wrapped in!
syntax match myIgnoreHs /!/ contained conceal
syn match myhelpvSpecial "!.*!" contains=myIgnoreHs
hi def link myhelpvSpecial mySpecial
The followig assigns the colourSynColor myspecial term=bold cterm=NONE ctermfg=Black gui=NONE guifg=#000000 guibg=LightYellow