Files
vim-thematic/plugin/thematic.vim
Reed Esau 2cb36c8a7b ongoing
2013-12-29 02:20:23 -07:00

76 lines
2.3 KiB
VimL

" =============================================================================
" File: plugin/thematic.vim
" Description: Theme Manager for the Vim text editor
" Maintainer: Reed Esau <github.com/reedes>
" =============================================================================
"
" TODO licensing
" TODO guioptions
" TODO screen capture
" TODO help file
" TODO command to support named theme, with custom completion
" TODO test from filetype
if exists('g:loaded_thematic') || &cp | finish | endif
let g:loaded_thematic = 1
" Save 'cpoptions' and set Vim default to enable line continuations.
let s:save_cpo = &cpo
set cpo&vim
let g:thematic#theme_name = ''
" Preserve original settings
let g:thematic#original = {
\ 'laststatus': &laststatus,
\ 'ruler': &ruler,
\ }
" Defaults
if !exists('g:thematic#defaults')
let g:thematic#defaults = {}
endif
if !exists('g:thematic#themes')
let g:thematic#themes = {
\ 'blue' : { 'sign-column-color-fix': 1,
\ 'fold-column-color-mute': 1,
\ },
\ 'desert' : { 'sign-column-color-fix': 1,
\ 'fold-column-color-mute': 1,
\ },
\ 'peachpuff' : {
\ },
\ 'slate' : {
\ },
\ }
endif
" Commands
command -nargs=0 ThematicNarrow call thematic#adjustColumns(-5)
command -nargs=0 ThematicWiden call thematic#adjustColumns(5)
command -nargs=0 ThematicFirst call thematic#load('#first')
command -nargs=0 ThematicNext call thematic#load('#next')
command -nargs=0 ThematicPrevious call thematic#load('#previous')
command -nargs=0 ThematicRandom call thematic#load('#random')
command -nargs=0 ThematicOriginal call thematic#load('#original')
"command! -nargs=1 MyCommand call s:MyFunc(<f-args>)
" Plugin mappings
noremap <silent> <Plug>ThematicNarrow :ThematicNarrow<CR>
noremap <silent> <Plug>ThematicWiden :ThematicWiden<CR>
" Create mappings for the `Thematic` commands
noremap <silent> <Plug>ThematicFirst :ThematicFirst<CR>
noremap <silent> <Plug>ThematicNext :ThematicNext<CR>
noremap <silent> <Plug>ThematicPrevious :ThematicPrevious<CR>
noremap <silent> <Plug>ThematicRandom :ThematicRandom<CR>
noremap <silent> <Plug>ThematicOriginal :ThematicOriginal<CR>
let &cpo = s:save_cpo
unlet s:save_cpo
" vim:ts=2:sw=2:sts=2