promptline.vim icon indicating copy to clipboard operation
promptline.vim copied to clipboard

Custom Themes

Open nfarrar opened this issue 10 years ago • 3 comments

The documentation is quite clear on how to define a custom preset, but I don't see anything about creating a custom theme. I looked through the source but didn't see an obvious way (not a vimscript pro though).

My airline segment colors don't map quite the way I'd like to my promptline segments, so I'm hoping there's a way to override it. Also since my vim color configuration is quite right atm, I'd like to hardcode the colors based on my shell rather than pulling them out of airline.

nfarrar avatar Jan 19 '15 20:01 nfarrar

Hi, sorry for my late response.

If I'm not mistaken, you can set a hash let g:promptline_theme = {...} (If curious, this is the code which handles hashes https://github.com/edkolev/promptline.vim/blob/master/autoload/promptline/themes.vim#L5)

So you could do something like this (sorry, I can't test it ATM, it could have syntax errors)

let g:promptline_theme =  {
        \'a'    : [233, 183],
        \'b'    : [231, 240],
        \'c'    : [188, 234],
        \'x'    : [188, 234],
        \'y'    : [231, 240],
        \'z'    : [233, 183],
        \'warn' : [232, 166]}

edkolev avatar Jan 28 '15 17:01 edkolev

but what do these numbers mean? are they rgb color codes? more explanation please

deathtrip avatar Mar 27 '17 18:03 deathtrip

They're ansi color codes, ranging from 0 to 255. Here's some image https://roseannastar.files.wordpress.com/2016/09/colortest1.png

edkolev avatar Mar 29 '17 06:03 edkolev