Vim Color Schemes

Discussion in 'Mac Programming' started by Not Available, May 1, 2010.

  1. Joined:
    Jun 30, 2009
    #1
    I've decided to use a color scheme for Vim, and I went for "desert", so I typed ":colorscheme desert" in .vimrc and tried again. No luck, the theme was still Red Sands, the Terminal's default. What am I doing wrong?
     
  2. mags631 Guest

    Joined:
    Mar 6, 2007
    #2
    1. Drop the colon in ":colorscheme desert" from the line in your .vimrc
    2. If you are running out of Terminal, then 256-color schemes will not display properly due to a limitation in Mac OS X's Terminal application. I've gone with MacVIM because I'm using a variant of evening which uses 256 colors.
     
  3. Not Available thread starter Guest

    Joined:
    Jun 30, 2009
    #3
    I've just looked into MacVim and I think I'm going to make the switch, it seems a little bit nicer to me, although I still have to work some things out. Thanks!
     
  4. mags631 Guest

    Joined:
    Mar 6, 2007
    #4
    Yes -- it is nice. My ultimate plan is eventually move to Terminal and find / create a color scheme that works with it.
     
  5. Not Available thread starter Guest

    Joined:
    Jun 30, 2009
    #5
    Thing is, I also have iTerm, which I remember reading that it does support 256-bit colors. It does not seem to work with it either. Hopefully Apple does something about it...

    Anyway, I've set it up kind of the way I want it to, but I was wondering if there is anything resembling Coda's Clips for Vim. A quick search on Google and Vim.org didn't bring anything up. I find this to be huge timesaver, and I think it can be done in Vim.
     
  6. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #6
    Having never used Coda I have no idea what you are talking about. Can you explain?
     
  7. Not Available thread starter Guest

    Joined:
    Jun 30, 2009
    #7
    Oh, I apologize. It's like typing "new", pressing TAB, and then a new basic HTML page is created, complete with XML declaration and XHTML DOCTYPE. And you can add others of your own (I, for example, have also added one for PHP tags -- yes, laziness at its peak -- and phpDocumentor). I think it is demoed here, at some point.
     
  8. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #8
    Sorry no idea on that score.

    As for Vim colour schemes. I've been using this one. If you set the Terminal to use the Pro colour scheme (Terminal -> Preferences -> click "Pro" on the left and then click "Default" at the bottom) it all works nicely.
     
  9. adariusbelly macrumors newbie

    Joined:
    May 12, 2010
    #9
    I see all the colors I'm supposed to see. Maybe it's a console issue. I don't know if your issue is still open, but here is the solution. vim takes certain settings from the color settings that you use in your console. If you enter the root console via 'su', you'll see that the colors are different. What you can do is copy your .bashrc file, or parts of it, to /root/ and then vim will show the same colors.
     
  10. CarlJ macrumors 68030

    CarlJ

    Joined:
    Feb 23, 2004
    Location:
    San Diego, CA, USA
    #10
    I think Coda's clips are somewhat a clone of TextMate's snippets; and there are a bunch of clones of that on vim.org; try snipMate, or SuperTab continued, or snippetsEmu. For HTML/CSS-specific coding, there's ZenCoding, which is quite popular.

    As far as colors go, I use MacVim's default, with a few minor tweaks and the background color set to LemonChiffon3 (sort of a light tan, much easier on the eyes than pure white).

    Note that Vim offers several levels of color support: all the way from only-inverse/bold/underline on an old-school terminal, through support for color terminals (with 16, 88, or 256 colors available), to full-blown GUI environments (with full 24-bit color, 16 million shades available). Many Vim color schemes only support the latter (24bit color), while Terminal.app only supports 16 colors (and then only with some unusable shades; if you want to use anything that shows colors in Terminal.app, you really need to install TerminalColours, probably the version patched for Snow Leopard, and tweak the colors to be more usable).

    So most of the more elaborate "theme"-oriented color schemes aren't going to work in Terminal.app no matter what. If you want your Vim windows to look just so, then use MacVim (highly recommended in any case, and go for the latest snapshot which is years newer than the "featured download", and just as stable if not more so).

    If you want other good ideas for plugins or color schemes, browse Vim.org's scripts archive sorted by highest rated or most downloads.
     

Share This Page