Loading ...
Sorry, an error occurred while loading the content.

Re: mapping to cycle colorschemes?

Expand Messages
  • _sc_
    ... you ll get a lot of responses to that :) my favorite is one that started with a thread on this very list:
    Message 1 of 5 , Jul 1, 2009
    • 0 Attachment
      On Wednesday 01 July 2009 2:40 pm, Keith Kaple wrote:
      >
      > Anyone have a script that can be mapped to perhaps a function key
      > that will cycle all available colorschemes?

      you'll get a lot of responses to that :)

      my favorite is one that started with a thread on this very list:

      http://home.swbell.net/toothpik/.vim/colorstepper.vim

      which i have mapped to some leader commands in my .vimrc with

      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>

      so i can step forward and back in the list

      hth,

      sc



      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Dennis Benzinger
      Hi Keith! ... There has been a thread about a similar question some weeks ago: http://groups.google.com/group/vim_use/browse_frm/thread/5eda184cd9aedde7 Hope
      Message 2 of 5 , Jul 1, 2009
      • 0 Attachment
        Hi Keith!

        Am 01.07.2009 21:40, Keith Kaple schrieb:
        > Anyone have a script that can be mapped to perhaps a function key that will cycle all available colorschemes?
        > [...]

        There has been a thread about a similar question some weeks ago:

        http://groups.google.com/group/vim_use/browse_frm/thread/5eda184cd9aedde7


        Hope this helps,
        Dennis Benzinger

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Christian Brabandt
        Hi Keith! ... I have this for switching to a random colorscheme: nmap :let colors = split(globpath(&rtp, **/colors/*.vim ), n ) :exe so .
        Message 3 of 5 , Jul 1, 2009
        • 0 Attachment
          Hi Keith!

          On Mi, 01 Jul 2009, Keith Kaple wrote:

          > Anyone have a script that can be mapped to perhaps a function key
          > that will cycle all available colorschemes?

          I have this for switching to a random colorscheme:

          nmap <F5> :let colors = split(globpath(&rtp, "**/colors/*.vim"),"\n")
          \<cr>:exe 'so ' . colors[localtime() % len(colors)]<cr>
          \:echomsg "Colorscheme: " . g:colors_name<cr>

          (3 lines)

          regards,
          Christian
          --
          :wq!

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Joe78
          ... http://vim.wikia.com/wiki/Switch_color_schemes --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist.
          Message 4 of 5 , Jul 1, 2009
          • 0 Attachment
            [07/01/09] At 12:40PM PDT, Keith Kaple wrote:
            >
            > Anyone have a script that can be mapped to perhaps a function key that will cycle all available colorschemes?

            http://vim.wikia.com/wiki/Switch_color_schemes

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.