Created
February 25, 2010 10:27
-
-
Save c9s/314439 to your computer and use it in GitHub Desktop.
vim colorscheme selector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun! s:SelectColorS() | |
50vnew | |
setlocal bufhidden=wipe buftype=nofile nonu fdc=0 | |
file ColorSchemeSelector | |
let files = split(glob(expand('~/.vim/colors/').'*')) | |
for file in files | |
let name = matchstr( file , '\w\+\(\.vim\)\@=' ) | |
if strlen(name) > 0 | |
put=name | |
endif | |
endfor | |
normal ggdd | |
setlocal nomodifiable | |
setlocal cursorline | |
hi CursorLine gui=reverse | |
nmap <buffer> <Enter> :cal g:SetColor()<CR> | |
nmap <buffer> <C-q> :q<CR> | |
nmap <buffer> e :exec 'tabe ~/.vim/colors/' . getline('.') . '.vim'<CR> | |
endf | |
com! SelectColorS :cal s:SelectColorS() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment