Skip to content

saghul/vim-colortoggle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

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 <silent><F11> :ToggleBg<CR>

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é [email protected]

About

A ViM plugin for toggling background and color scheme

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published