Created
July 15, 2016 03:59
-
-
Save mattn/cad18067dbd09cf75e46336507134ac2 to your computer and use it in GitHub Desktop.
This file contains 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
function! s:SelectColorScheme() | |
silent 15vnew | |
silent file `="SelectColorScheme"` | |
call setline(1, sort(map(split(globpath(&rtp, 'colors/*.vim'), "\n"), 'fnamemodify(v:val, ":t:r")'))) | |
call search(g:colors_name) | |
setlocal bufhidden=wipe buftype=nofile nonu nomodifiable cursorline | |
augroup SelectColor | |
au! | |
au CursorMoved <buffer> :exe 'colorscheme' getline('.') | |
augroup END | |
nnoremap <buffer> <silent> q <c-w>c | |
endfunction | |
command! SelectColorScheme call s:SelectColorScheme() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment