Mac OS X vim colors mangled

后端 未结 7 2092
自闭症患者
自闭症患者 2021-02-13 12:09

Here\'s my setup

  • Mac OS X 10.6
  • VIM (default version that comes with OSX 10.6)
  • rails.vim (installed in .vim/autoload)
  • ir_black.vim (insta
相关标签:
7条回答
  • 2021-02-13 12:49

    I use ir_black in Terminal.app but in 16 color mode, and it looks great. If you really prefer 256 color, I recommend iTerm2. The settings allow you to have the terminal report itself as "xterm-256" which is what's needed to use 256 colors in Vim.

    Check this website for the procedure: http://kevin.colyar.net/2011/01/pretty-vim-color-schemes-in-iterm2

    There is a ir_black-based Vim theme called tir_black which is better suited for 256 colors: http://www.vim.org/scripts/script.php?script_id=2777

    Looks awesome!

    iTerm2 also has loads of nifty features.

    I hope this helps.

    0 讨论(0)
  • 2021-02-13 12:50

    on testing which colors can be displayed in your terminal of choice: i just found this perl script on vim.org which dumps a list of 256 colors your terminal could possibly display... http://www.vim.org/scripts/script.php?script_id=1349

    0 讨论(0)
  • 2021-02-13 12:54

    I had the same issue with iTerm and solved it by going to Settings > Profile > Terminal > Report Terminal Type and setting it to xterm-256color.

    0 讨论(0)
  • 2021-02-13 12:59

    The Mac OSX Terminal.app in Snow Leopard does not support 256 colors, which is required for the ir_black theme (this is the theme I use).

    Download and try something like iTerm.app (http://iterm.sourceforge.net/), and you shouldn't have a problem with colors.

    Or you could use MacVim (http://code.google.com/p/macvim/)

    Edit: As of OSX 10.7 Lion, the built in Terminal.app now supports 256 colors. See the comment below by Chris Page for how to achieve this.

    0 讨论(0)
  • 2021-02-13 13:09

    I have been using iTerm and was shocked to find out Terminal.app doesn't support 256 colors! I recommend Bryan's answer.

    However, if you ever get in a bind like this, you can change $TERM to vt100 and vim won't try to use colors. In bash (the default MacOSX shell) you set this with:

    export TERM='vt100'
    
    0 讨论(0)
  • 2021-02-13 13:10

    I've been using a nearly identical setup, except for vim, which I grab from Macports. A few years ago I found ir_black and loved it. I now use it for all vim sessions, Terminal.app, and TextMate. Getting it to work with Leopard, and then Snow Leopard was a tad hokey. But things have improved. Follow the instructions here, Making Terminal.app look great in Snow Leopard.

    0 讨论(0)
提交回复
热议问题