Create a gist now

Instantly share code, notes, and snippets.

@c9s /.vimrc
Created Feb 25, 2010

What would you like to do?
vim colorscheme selector
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