-
Kiffin Gish <Kiffi...@planet.nl>
Gouda, The Netherlands
Execute the following line in every colorscheme directory (~/.vim/colors
and $VIMRUNTIME/colors). Replace xyz with the file you want to view.
for f in *.vim; do gview -c ":colorscheme `basename $f .vim`" xyz; done
HTH,
Dennis Benzinger
i got this from this very list, and i *think* it is enshrined
somewhere as a tip:
nnoremap <Leader>n :call Step_color()<CR>
nnoremap <Leader>ns :source ~/.vim/colorstepper.vim<CR>
nnoremap <Leader>o :echo g:colors_name<CR>
nnoremap <Leader>p :call Step_color_back()<CR>
<colorstepper.vim>
" colorstepper changes colorscheme to the "next" color
" saves position in global variable
" re-obtains list of schemes every time, so new colors will
" be automatically added
"
" extra credit will be awarded to the student who can tell
" me why the echo of colors_name works sometimes and sometimes
" doesn't
"
" interestingly it now seems to have stopped working entirely
"
function! Step_color()
let mycolors = split(globpath(&rtp,"colors/*.vim"),"\n")
if exists("g:color_step")
let g:color_step += 1
if g:color_step > len(mycolors) - 1
let g:color_step = 0
endif
else
let g:color_step = 0
endif
silent exe 'so ' . mycolors[g:color_step]
echo g:colors_name "\n"
unlet mycolors
endfunction
function! Step_color_back()
let mycolors = split(globpath(&rtp,"colors/*.vim"),"\n")
if exists("g:color_step")
let g:color_step -= 1
if g:color_step < 0
let g:color_step = len(mycolors) - 1
endif
else
let g:color_step = 5
endif
silent exe 'so ' . mycolors[g:color_step]
echo g:colors_name
unlet mycolors
endfunction
"nmap <F6> :call Step_color()<CR> <Bar> :echo g:colors_name<CR>
"nmap <F7> :echo g:colors_name<CR>
"nmap <S-F6> :call Step_color_back()<CR> <Bar> :echo g:colors_name<CR>
</colorstepper.vim>
by adding a '\n' to the echo in Step_color i am able to see the
name, but that's a hack and causes me to have to hit enter before i
can see the new colorscheme in the whole window, so if you fix that
feel free to share
anyway, this is a fun script to play around with
enjoy
sc
Use :echo g:colors_name
Dennis Benzinger
Here is a good script:
http://vim.wikia.com/wiki/Switch_color_schemes
John
In gvim, use the "Edit => Color Scheme" menu, where every installed
colorscheme has a submenu.
In Console Vim, either use the other solutions proposed, or the
following (if compiled with +menu):
:set wildmenu
:runtime menu.vim
:emenu Edit.Color\ Scheme.<Tab>
Select by <Left> <Right>, accept by <Enter>, abort by <Cancel>.
You can enter part of the name and hit <Tab> again to go faster to a
given part of the menu.
To try a second, third, etc., colorscheme, repeat only the :emenu command.
You can also reach the submenu by command-line completion (in 'wildmenu'
mode, <Down> will descend into a submenu).
If you want to remap the emenu command to a key, see ":help 'wildcharm'".
Best regards,
Tony.
--
Impossible, adj.:
(1) I wouldn't like it and when it happens I won't approve;
(2) I can't be bothered; (3) God can't be bothered. Meaning (3) may
perhaps be valid but the others are 101% whaledreck.
-- Chad C. Mulligan, "The Hipcrime Vocab"
This is what would happen if you load a colorscheme that isn't named
"martin_krischik.vim", but that had the line
let g:colors_name = "martin_krischik.vim"
in it.
> Only the original 17 schemes show up. Is this because I'm running vim
> in linux using a rox-term? I did set my vimrc to display 256 colors.
Not sure about this problem, though.
> thanks for the help.
>
> Pedro
<snip bottom context>
> From: vim...@googlegroups.com [x...@xxx.xxx] On Behalf Of Yakov [x...@xxx.xxx]
> Sent: Thursday, April 30, 2009 2:37 PM
> To: vim_use
> Subject: Re: Cycle easily through custom schemes ...
In the future, please put your messages directly below the quotes that
you're referencing. Bottom posting is the established convention on
this mailing list.
~Matt
>> Only the original 17 schemes show up. Is this because I'm running vim
> >in linux using a rox-term? I did set my vimrc to display 256 colors.
>Not sure about this problem, though.
Thanks for your help. I fixed the problem by unzipping at a different level of the directory, rather than at individual subdirectories. The plugin works fine now and I can see all the schemes.
Pedro