An open API service indexing awesome lists of open source software.

https://github.com/saghul/vim-colortoggle

A ViM plugin for toggling background and color scheme
https://github.com/saghul/vim-colortoggle

Last synced: 4 months ago
JSON representation

A ViM plugin for toggling background and color scheme

Awesome Lists containing this project

README

          

Color toggling plugin for ViM
=============================

This plugin will allow you to toggle the background and colorscheme
together with a single key.

Installation
------------

If you are using pathogen:

git clone https://github.com/saghul/vim-colortoggle.git ~/.vim/bundle/vim-colortoggle

If you are not using any plugins manager, just copy the folder plugin into your
~/.vim directory

Usage
-----

Define global variables with your default background choice and color
schemes for dark and light backgrounds. Example:

let g:default_background_type = "dark"
let g:dark_colorscheme = "mustang"
let g:light_colorscheme = "pyte"

Then map the key you want to the ToggleBg function:

map :ToggleBg

Extra
-----

If you want the current value to be saved and restored you need to tell
viminfo to store global variables, by appending the ! symbol:

" viminfo options: http://vimdoc.sourceforge.net/htmldoc/usr_21.html#21.3
set viminfo='100,<50,s10,h,!
rviminfo

This is my first plugin for ViM, hope you like it :-)

Saúl Ibarra Corretgé