How to tell which colorscheme a Vim session currently uses

后端 未结 3 1001
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 08:16

You can set the Vim color scheme by issuing

:colorscheme SCHEME_NAME

but, oddly enough, you can\'t get the currently used scheme by is

3条回答
  •  执念已碎
    2021-01-30 08:27

    A one-line version of DrAl's answer:

    let current_scheme = get(g:, 'colors_name', 'default')
    

    The get() function will fall back to 'default' if the variable has not yet been set.

提交回复
热议问题