Vim Mac Os X

Mac Os X Vim Colors

My mac is inaccesible to me right now but try this:
# How do I get colors in Terminal vim?
Update: I think this is only a problem for Mac OS X versions 10.0 and 10.1.
According to Rajesh Duggal, the termcap database that comes with Mac OS X is incorrect. There are two solutions: you can edit the termcap database (which requires superuser privileges) or you can add some extra lines to your vimrc (or other startup) file. Another theory is that the right terminal type for Terminal.app is Beos-Ansi.
1. (Rob Griffiths) Try
:set term=builtin_beos-ansi
This requires that your version of vim was compiled with support for this terminal type. If it works, add a line like this (with or without the leading : character) to your vimrc file. For further details, see Mac OS X Hints.
On Mac OS X 10.2 (Jaguar), :set term=ansi may work better. I have some reports that builtin_beos-ansi works and some reports that it does not. Both work for me, but with different colors.
2. (Rajesh Duggal) Edit the termcap database:
1. % sudo vim /usr/share/misc/termcap
2. Add the second of these lines between the other two, which should already be there:
d0|vt100|vt100-am|vt100am|dec vt100:
:Co#8:Sf=E[3%dm:Sb=E[4%dm:
:do=^J:co#80:li#24:cl=E[;HE[2J:sf=2*ED:
3. Reconstruct the database with
$ sudo cap_mkdb /usr/share/misc/termcap
4. Quit and restart Terminal, and you'll pick up the new termcap entry.
3. (Jens Vagelpohl) Add lines something like the following to your vimrc file:
if !has('gui') && has('terminfo')
set t_Co=16
set t_AB=^[[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm
set t_AF=^[[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm
else
set t_Co=16
set t_Sf=^[[3%dm
set t_Sb=^[[4%dm
endif
Note that '^[' should be replaced by a raw Escape character.
# How do I get colors in Terminal vim?
Update: I think this is only a problem for Mac OS X versions 10.0 and 10.1.
According to Rajesh Duggal, the termcap database that comes with Mac OS X is incorrect. There are two solutions: you can edit the termcap database (which requires superuser privileges) or you can add some extra lines to your vimrc (or other startup) file. Another theory is that the right terminal type for Terminal.app is Beos-Ansi.
1. (Rob Griffiths) Try
:set term=builtin_beos-ansi
This requires that your version of vim was compiled with support for this terminal type. If it works, add a line like this (with or without the leading : character) to your vimrc file. For further details, see Mac OS X Hints.
On Mac OS X 10.2 (Jaguar), :set term=ansi may work better. I have some reports that builtin_beos-ansi works and some reports that it does not. Both work for me, but with different colors.
2. (Rajesh Duggal) Edit the termcap database:
1. % sudo vim /usr/share/misc/termcap
2. Add the second of these lines between the other two, which should already be there:
d0|vt100|vt100-am|vt100am|dec vt100:
:Co#8:Sf=E[3%dm:Sb=E[4%dm:
:do=^J:co#80:li#24:cl=E[;HE[2J:sf=2*ED:
3. Reconstruct the database with
$ sudo cap_mkdb /usr/share/misc/termcap
4. Quit and restart Terminal, and you'll pick up the new termcap entry.
3. (Jens Vagelpohl) Add lines something like the following to your vimrc file:
if !has('gui') && has('terminfo')
set t_Co=16
set t_AB=^[[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm
set t_AF=^[[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm
else
set t_Co=16
set t_Sf=^[[3%dm
set t_Sb=^[[4%dm
endif
Note that '^[' should be replaced by a raw Escape character.


- I am using OS X 10.9.1 (Mavericks). What are the systematic steps to install to Gvim or MacVim in Mac OS? If you write the steps using 1, 2, 3., it would be easy to follow.
- I am running Vim 7.4 on Mac OS X Snow Leopard (10.6.8), and I never encountered mouse support using iTerm until yesterday, when all the mouse functions suddenly stopped working. My.vimrc already contained set mouse=a, but I still could not use the mouse functions.
- The Vimrc file lives under the home directory of the user account running Vim. For example, when my user account is 'matt', on Mac OS X my Vimrc file is found at /Users/matt/.vimrc. On Ubuntu Linux my.vimrc file can be found within the /home/matt/.
Vim Mac Os X Operating System
The Vimrc file lives under the home directory of the user account running Vim. For example, when my user account is 'matt', on Mac OS X my Vimrc file is found at /Users/matt/.vimrc. On Ubuntu Linux my.vimrc file can be found within the /home/matt/ directory. First, install it. On your Mac, you can use Homebrew: $ brew install tmux. Ubuntu or Debian users can user apt-get: $ sudo apt-get install tmux. Now, colors are also an issue when running Vim within Tmux. Create or edit the file /.tmux.conf: $ vim /.tmux.conf set -g default-terminal 'screen-256color' Now we're ready.
