Cycle easily through custom schemes ...

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Cycle easily through custom schemes ...

Kiffin Gish

What's the quickest way to cycle through all the color schemes to help
me choose the one I like best?

-  
Kiffin Gish <[hidden email]>
Gouda, The Netherlands




--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cycle easily through custom schemes ...

Dennis Benzinger

Am 19.04.2009 20:00, Kiffin Gish schrieb:
> What's the quickest way to cycle through all the color schemes to help
> me choose the one I like best?
> [...]

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

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cycle easily through custom schemes ...

Kiffin Gish

Elegant scripting! However, I was hoping more for some kind of hot key
from within vim that I could hit in series viewing the color schemes
quickly.

-  
Kiffin Gish <[hidden email]>
Gouda, The Netherlands



On Sun, 2009-04-19 at 20:14 +0200, Dennis Benzinger wrote:

> Am 19.04.2009 20:00, Kiffin Gish schrieb:
> > What's the quickest way to cycle through all the color schemes to help
> > me choose the one I like best?
> > [...]
>
> 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
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cycle easily through custom schemes ...

Kiffin Gish
In reply to this post by Dennis Benzinger

Okay, say I've decided which one I like best how can I find out which
colorscheme that window is?
-  
Kiffin Gish <[hidden email]>
Gouda, The Netherlands



On Sun, 2009-04-19 at 20:14 +0200, Dennis Benzinger wrote:

> Am 19.04.2009 20:00, Kiffin Gish schrieb:
> > What's the quickest way to cycle through all the color schemes to help
> > me choose the one I like best?
> > [...]
>
> 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
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cycle easily through custom schemes ...

scott-268
In reply to this post by Kiffin Gish

On Sunday 19 April 2009 1:25 pm, Kiffin Gish wrote:
>
> Elegant scripting! However, I was hoping more for some kind of hot key
> from within vim that I could hit in series viewing the color schemes
> quickly.

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


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cycle easily through custom schemes ...

Kiffin Gish

Great stuff! Thanks.
-  
Kiffin Gish <[hidden email]>
Gouda, The Netherlands



On Sun, 2009-04-19 at 13:49 -0500, _sc_ wrote:

> On Sunday 19 April 2009 1:25 pm, Kiffin Gish wrote:
> >
> > Elegant scripting! However, I was hoping more for some kind of hot key
> > from within vim that I could hit in series viewing the color schemes
> > quickly.
>
> 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
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cycle easily through custom schemes ...

Dennis Benzinger
In reply to this post by Kiffin Gish

Am 19.04.2009 20:33, Kiffin Gish schrieb:
> Okay, say I've decided which one I like best how can I find out which
> colorscheme that window is?
> [...]

Use :echo g:colors_name


Dennis Benzinger

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

RE: Cycle easily through custom schemes ...

JohnBeckett
In reply to this post by Kiffin Gish

Kiffin Gish wrote:
> What's the quickest way to cycle through all the color
> schemes to help me choose the one I like best?

Here is a good script:
http://vim.wikia.com/wiki/Switch_color_schemes

John


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cycle easily through custom schemes ...

Tony Mechelynck
In reply to this post by Kiffin Gish

On 19/04/09 20:00, Kiffin Gish wrote:
>
> What's the quickest way to cycle through all the color schemes to help
> me choose the one I like best?

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"

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cycle easily through custom schemes ...

iler.ml
In reply to this post by Kiffin Gish

http://www.vim.org/scripts/script.php?script_id=1488
ScrollColors : Colorsheme Scroller, Chooser, and Browser

SHORT USAGE DESCRIPTION:
   Drop ScrollColors.vim into your plugin directory.
   Type :SCROLL
   Use arrow keys to walk through colorschemes, ? for help, Esc to
exit.

DETAILED DESCRIPTION:
   1. source ScrollColors.vim  " or drop ScrollColors.vim into
                          " your ~/.vim/plugins directory
   2. Type :SCROLL
        Another synonym is :COLOR
   3. Use arrows to scroll thgough colorschemes.
   4. When done, press Esc to exit. You will be prompted
      wether to

   You can download 140 colorschemes pack from:
        http://www.vim.org/scripts/script.php?script_id=625
   Having 140 installed colorschemes is in no way prerequisite for
ScrollColors. But with ScrollColors you can preview 140 colorschemes
in couple of minutes. Have fun.

CUSTOM KEY MAPPINGS:
   You can map two keys of your choice to NextColor and PrevColor
actions.
   Choose pair of shortcut keys (for example <F2> and <f3>, or \n and
\p)
   and map them as follows:
      map <silent><F3> :NEXTCOLOR<cr>
      map <silent><F2> :PREVCOLOR<cr>
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

RE: Cycle easily through custom schemes ...

Vera, Pedro L.


Thanks for the tip. The scroll plugin works really well. However, I'm having problem with the added schemes. I unzipped the files as the webpage suggested, but when I run vim I get the following error:

Error detected while processing /usr/share/vim/vim72/syntax/synload.vim:
line   19:
E185: Cannot find color scheme martin_krischik
Press ENTER or type command to continue


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.

thanks for the help.

Pedro
________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Yakov [[hidden email]]
Sent: Thursday, April 30, 2009 2:37 PM
To: vim_use
Subject: Re: Cycle easily through custom schemes ...

http://www.vim.org/scripts/script.php?script_id=1488
ScrollColors : Colorsheme Scroller, Chooser, and Browser

SHORT USAGE DESCRIPTION:
   Drop ScrollColors.vim into your plugin directory.
   Type :SCROLL
   Use arrow keys to walk through colorschemes, ? for help, Esc to
exit.

DETAILED DESCRIPTION:
   1. source ScrollColors.vim  " or drop ScrollColors.vim into
                          " your ~/.vim/plugins directory
   2. Type :SCROLL
        Another synonym is :COLOR
   3. Use arrows to scroll thgough colorschemes.
   4. When done, press Esc to exit. You will be prompted
      wether to

   You can download 140 colorschemes pack from:
        http://www.vim.org/scripts/script.php?script_id=625
   Having 140 installed colorschemes is in no way prerequisite for
ScrollColors. But with ScrollColors you can preview 140 colorschemes
in couple of minutes. Have fun.

CUSTOM KEY MAPPINGS:
   You can map two keys of your choice to NextColor and PrevColor
actions.
   Choose pair of shortcut keys (for example <F2> and <f3>, or \n and
\p)
   and map them as follows:
      map <silent><F3> :NEXTCOLOR<cr>
      map <silent><F2> :PREVCOLOR<cr>


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cycle easily through custom schemes ...

Matt Wozniski-2

On Thu, Apr 30, 2009 at 6:10 PM, Vera, Pedro L. wrote:

>
>
> Thanks for the tip. The scroll plugin works really well. However, I'm
> having problem with the added schemes. I unzipped the files as the
> webpage suggested, but when I run vim I get the following error:
>
> Error detected while processing /usr/share/vim/vim72/syntax/synload.vim:
> line   19:
> E185: Cannot find color scheme martin_krischik
> Press ENTER or type command to continue

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: [hidden email] [[hidden email]] On Behalf Of Yakov [[hidden email]]
> 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

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

RE: Cycle easily through custom schemes ...

Vera, Pedro L.

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


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---