Defining a color variable in vim?

It's not possible with the built in syntax. However, it can be done if the you make your own syntax: let UglyColor = '#40ffff' let Greenish = '#00dd00' let MyStyle = 'bold' exe 'hi Keyword gui=' . MyStyle .' guifg=' .

UglyColor exe 'hi Comment guifg=' . Greenish You could then take this further by creating a dictionary: let UglyColor = '#40ffff' let Greenish = '#00dd00' let ColourAssignment = {} let ColourAssignment'Keyword' = {"GUIFG": UglyColor, "GUI": "Bold"} let ColourAssignment'Comment' = {"GUIFG": Greenish} And then process it with something like this: for key in keys(ColourAssignment) let s:colours = ColourAssignmentkey if has_key(s:colours, 'GUI') let gui = s:colours'GUI' else let gui='NONE' endif if has_key(s:colours, 'GUIFG') let guifg = s:colours'GUIFG' else let guifg='NONE' endif if has_key(s:colours, 'GUIBG') let guibg = s:colours'GUIBG' else let guibg='NONE' endif if key =~ '^\k*$' execute "hi ".key." term=".term. " cterm=".cterm.

" gui=".gui." ctermfg=".ctermfg. " guifg=".guifg. " ctermbg=".ctermbg." guibg=".guibg.

" guisp=". Guisp endif This is how my Bandit colour scheme works (with a bit more logic in there for auto-generating cterm colours, light background colours and a syntax file so that the colour scheme self-highlights). Feel free to have a look at that one and steal the functions and format for your own colour scheme.

I do this by directing the output of hi Normal to a variable, and then extracting the various information from it. If there is a cleaner method, let me know!

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send