VIM on the terminal

Z

zero17

Guest
Is anybody know how to make vim colorful on the terminal mac os x like the one in the linux terminal. it seems every time I use vim on terminal mac os x doesn't even have colors, and different like on the linux terminal. should I set up something? or is it the default like that? thanks..

ps: my os is mac os x 10.3.9 panther
 
Joined
Mar 9, 2004
Messages
2,860
Reaction score
21
Points
38
Location
Miami FL
Your Mac's Specs
G4 1Ghz OS X 10.4.7
Choose Terminal > Window Settings.
Choose a setting (Display, Color, or Window) from the Terminal Inspector pop-up menu.
Make the settings you want for your Terminal windows.
Click "Use Settings as Defaults" if you want to preserve these settings as the default settings for all new Terminal windows from Mac help
 
OP
Z

zero17

Guest
witeshark said:
Choose Terminal > Window Settings.
Choose a setting (Display, Color, or Window) from the Terminal Inspector pop-up menu.
Make the settings you want for your Terminal windows.
Click "Use Settings as Defaults" if you want to preserve these settings as the default settings for all new Terminal windows from Mac help

thanks for the answer, but I don't think that's what I mean.. what I mean was how to make the font colors if I edit a file, for example .cpp file on vim like this: (this is from my linux box)
color9rt.jpg


in fact my terminal on my mac doesn't look like above, but look like this:
plain3fl.jpg


the version of vim in my mac and my linux are the same. any idea? or is it the default like that and I cannot change anything...
 
Joined
Mar 9, 2004
Messages
2,860
Reaction score
21
Points
38
Location
Miami FL
Your Mac's Specs
G4 1Ghz OS X 10.4.7
That's a good question. I hate when I have no answer, but to ignore is no good, so I will look into it more
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
In the old days (not to long in the distant past), you would use a string of escape sequences. I don't know what you use now.
 
OP
Z

zero17

Guest
witeshark said:
That's a good question. I hate when I have no answer, but to ignore is no good, so I will look into it more

thanks witeshark I appreciate it.. :mac:
 
OP
M

meltbanana314

Guest
You're talking about syntax highlighting, right?

Open up your terminal, become a super user, then open up your .vimrc file and add these lines:

set nocompatible " vim>vi
syntax on " Enable syntax highlighting
filetype on " Enable filetype detection
filetype indent on " Enable filetype-specific indenting
filetype plugin on " Enable filetype-specific plugins

Then save and close the file, quit the terminal and then restart it.

EDIT: those are tabs after the words (before the quotation marks) but the stupid forum software truncated the lines.
 
OP
Z

zero17

Guest
meltbanana314 said:
You're talking about syntax highlighting, right?

Open up your terminal, become a super user, then open up your .vimrc file and add these lines:

set nocompatible " vim>vi
syntax on " Enable syntax highlighting
filetype on " Enable filetype detection
filetype indent on " Enable filetype-specific indenting
filetype plugin on " Enable filetype-specific plugins

Then save and close the file, quit the terminal and then restart it.

EDIT: those are tabs after the words (before the quotation marks) but the stupid forum software truncated the lines.

thanks a lot.. it's miracle.. my vim is colors.. :D thanks a lot dude.. you save my life.
 
Joined
Feb 9, 2005
Messages
2,340
Reaction score
82
Points
48
Location
DFW
Your Mac's Specs
MacBook Pro 13" | MacBook Pro 13" | Mac Mini 2GHz C2D
meltbanana314 said:
You're talking about syntax highlighting, right?

...then open up your .vimrc file and add these lines:

how do you do that?
 
OP
Z

zero17

Guest
fearlessfreap24 said:
how do you do that?

open terminal... then type
vim .vimrc

then type the things.. then quit and save it
press esc : wq
wq for write and quit
 
Joined
Mar 9, 2004
Messages
2,860
Reaction score
21
Points
38
Location
Miami FL
Your Mac's Specs
G4 1Ghz OS X 10.4.7
This is so nice to know - thanks meltbanana314
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top