Sponsored Content
Full Discussion: vim and syntax max os
Operating Systems OS X (Apple) vim and syntax max os Post 302115994 by dlundh on Monday 30th of April 2007 02:22:57 PM
Old 04-30-2007
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[;H\E[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.
 

9 More Discussions You Might Find Interesting

1. Solaris

Vim 7.0

I want to install VIM 7.0 from sunfreeware.com onto a server. The security guys are giving me a hard time because they found this security vulnerability. http://xforce.iss.net/xforce/xfdb/6259 This vulnerability came out in 2001, and it looks like it was mostly for linux, but I cant be... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

2. UNIX for Dummies Questions & Answers

Need some help with vim

I use vim for writing code. I was using nano but found that vim is a much advanced editor. I am trying to achieve something like this: When trying a loop or a function, I generally type: function name() {} Now when I take my cursor one position to the left and press the return key, it give... (4 Replies)
Discussion started by: Legend986
4 Replies

3. UNIX for Dummies Questions & Answers

Syntax coloring for .pc files in VIM editor

Hi, i am using VIM editor through Putty. By the option of Syntax on in .vimrc file i am able to see syntax colors in .c and .cpp files but not in the files with .pc extension. How can this be done? :confused: (2 Replies)
Discussion started by: RuchK
2 Replies

4. UNIX for Advanced & Expert Users

About Vim

Hello, what is the maximum size of a file that we can open using vim. (3 Replies)
Discussion started by: nagalenoj
3 Replies

5. UNIX for Advanced & Expert Users

vim

Does anyone know the fast way to go to tab/2 distance in vim. I mean set four spaces. (1 Reply)
Discussion started by: mirusnet
1 Replies

6. Solaris

Very Importan - Vim Settings - Error while opening a File using vim

I downloaded vim.7.2 and compiled the vim source . Added the vim binary path to PATH (Because iam not the root of the box) when i load the file using vim it throws me an error Error detected while processing /home2/e3003091/.vimrc: line 2: E185: Cannot find color scheme darkblue line... (0 Replies)
Discussion started by: girija
0 Replies

7. Shell Programming and Scripting

Help with update vim file-syntax relationship?

There are some ksh files named as "*.lib" in my system. When I open them in VIM, vim syntax can't parse it correctly. Is there a way that I can relate the *.lib with KSH syntax in VIM? Due to access limitation, i can only update the files under my home directory and can't modify the VIM... (6 Replies)
Discussion started by: sleepy_11
6 Replies

8. AIX

[Vim] Question about syntax highlighting

Hi all, my sysadmin installed Vim packages (vim-enhanced-6.3-1 & vim-common-6.3-1) on an Aix system (7.1.0.0). I log in using Putty (vs 0.54) and got an annoying underline issue. All strings and var names are underlined as you can see on the attached file Is it possible to get rid of that... (4 Replies)
Discussion started by: Fundix
4 Replies

9. UNIX for Dummies Questions & Answers

Reapplying syntax highlighting in vim

I had a bash script (ma_report.sh) that I was editing when my VPN connection died. So, when I reconnected, I recovered my changes and reopened the file. Everything looks fine except that there is no longer any syntax highlighting. Using ':syntax on' does not work. Other bash scripts in vim do... (1 Reply)
Discussion started by: treesloth
1 Replies
infotocap(1M)															     infotocap(1M)

NAME
infotocap - convert a terminfo description into a termcap description SYNOPSIS
infotocap [-vn width] [-V] [-1] [-w width] file . . . DESCRIPTION
infotocap looks in file for terminfo descriptions. For each one found, an equivalent termcap description is written to standard output. Terminfo use capabilities are translated directly to termcap tc capabilities. -v print out tracing information on standard error as the program runs. -V print out the version of the program in use on standard error and exit. -1 cause the fields to print out one to a line. Otherwise, the fields will be printed several to a line to a maximum width of 60 charac- ters. -w change the output to width characters. FILES
/usr/share/terminfo Compiled terminal description database. NOTES
This utility is actually a link to tic(1M), running in -C mode. You can use other tic options such as -f and -x. SEE ALSO
curses(3X), tic(1M), infocmp(1M), terminfo(5) infotocap(1M)
All times are GMT -4. The time now is 02:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy