Home

Awesome

Color scheme manager for Vim

An add-on for vim-colorscheme-switcher.

Author

Taverius

Installation

Requires vim-colorscheme-switcher, must be installed separately.

Requires vim-misc, must be installed separately.

Manually

  1. Put all files under $VIM.

Pathogen

  1. Install with the following command.

    git clone https://github.com/Taverius/vim-colorscheme-manager ~/.vim/bundle/vim-colorscheme-manager
    

Dein.vim

  1. Add the following configuration to your .vimrc.

    call dein#add('Taverius/vim-colorscheme-manager')
    
  2. Install with :call dein#install().

vim-plug

  1. Add the following configuration to your .vimrc.

    Plug 'Taverius/vim-colorscheme-manager'
    
  2. Install with :PlugInstall.

Commands

The :BlacklistAddColorScheme command

Blacklist the current colorscheme and cycle forwards or backwards once. See g:colorscheme_manager_blacklist_direction below.

Optionally, takes a colorscheme name as an argument, and operates on that instead of the current one.

The :BlacklistRemColorScheme command

Remove the current colorscheme from the blacklist.

Optionally, takes a colorscheme name as an argument, and operates on that instead of the current one.

The :BlacklistPruneColorScheme command

Removes non-existent (i.e. not in runtime path) colorschemes from blacklist.

The :SwitchToColorScheme command

Syntactic sugar for xolox#colorscheme_switcher#switch_to(colorscheme), takes a colorscheme name as argument.

Useful for switching to a colorscheme you just installed with Vundle/NeoBundle/etc, or to use as custom command for a colorscheme browser - for example, unite.vim with unite-colorscheme

Options

The plug-in should work out of the box, but you can change the configuration defaults if you want to change how the plug-in works.

The g:colorscheme_manager_define_mappings option

By default the plug-in maps the following keys in insert and normal mode:

To disable these mappings (e.g. because you're already using them for a different purpose) you can set the option g:colorscheme_manager_define_mappings to 0 (false) in your vimrc.

The g:colorscheme_manager_blacklist_direction option

By default the plug-in cycles forward one colorscheme when adding the current one to the blacklist.

If you set this variable to 0 (false), it will instead cycle backwards.

The g:colorscheme_manager_global_last option

By default the plug-in reads both blacklist and last colorscheme from file.

If you set this option to 1 (true) in your vimrc, a global variable will take precedence unless empty.

Together with vim sessions with the option to store global variables enabled, this allows you to have a different colorscheme for each vim session.

The g:ColorschemeManagerLast option

This option is a string specifying the last the last used colorscheme. It will be written to by the plug-in if g:colorscheme_manager_global_last is 1 (true).

If sessionoptions contains globals, :mksession will store this variable in the session file.

The g:colorscheme_manager_file option

The filename the plug-in will write its persistence data to.

Defaults to:

Set this to your preferred value in your vimrc to override the location.

License

Copyright (c) Leonardo Valeri Manera. Distributed under the same terms as Vim itself. See :help license.