over 3 years ago

MacVim在Terminal上顏色的支援比較好,看起來也較舒服。(至少個人是這樣認為啦~)

MacVim安裝 (Reference: osx - Gvim or MacVim in Mac OS X - Stack Overflow)

  1. Download XCode and install
  2. brew update
  3. brew install macvim
  4. brew link macvim

安裝完後,就會出現在Applications。在terminal內則可以使用mvim將文件用MacVim編輯。

MacVim的設定則是可以寫在.gvimrc(同.vimrc),像字型設定可以先使用:set gfn=*指令顯示字型的視窗,來測試調整成自己需要的值,用set guifont=xxx寫入到.gvimrc。例如使用Monaco字型,大小設為16,:set guifont=Monaco:h16

color scheme有很多,在Vim Color Scheme Test - Google Code有各式各樣的scheme可以挑選。因為太多了,我就從10 Vim Color Schemes You Need to Own - Vim Ninjas挑選。

最後terminal裡的Vim和MacVim的color比較圖(colorscheme為solarized)
terminal Vim


MacVim

現在就知道,我為什麼使用MacVim了~

2014/10/17補充:
color為何不同,可以參考這篇文章Using GUI color settings in a terminal - Vim Tips Wiki,其中提到:

Also, terminals can be set up with different color palettes, so the same color scheme may look very different on different machines or different terminals. Vim's GUI does not have this problem since colors for the GUI are defined by their true color (their red, green and blue components). However, some people prefer to use Vim in a terminal rather than gvim.

對我而言直接用MacVim(GUI Vim)的最大好處,就是簡省了時間去調整color的設定。

← Vim上trace code Apache Thrift - (1)安裝 →
 
comments powered by Disqus