Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Vim editor with syntax highlighting UNIX
I have managed to compile on Mac OS X final the "vim" editor from www.vim.org - version 5.7, but syntax highlighting is working WITHOUT COLORS - syntax elements are highlighted only by "underline" attribute, not by colors. Does anybody know:

a. how to activate colors in vim in Mac OS X?
b. how to run vim as gvim, i.e. in graphical mode?

--
jpzr.
    •    
  • Currently 3.50 / 5
  You rated: 4 / 5 (4 votes cast)
 
[12,828 views]  

Vim editor with syntax highlighting | 4 comments | Create New Account
Click here to return to the 'Vim editor with syntax highlighting' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
VIM
Authored by: Newt on Apr 10, '01 06:38:12PM

I know you posted this a while ago, but... I am not familiar with this product, but I did check out there page since I was curious about the product. I am an Emacs person myself, and since I have not yet attempted to get X Windows (in any form) up and running yet, I cannot use my fav version of Emacs. In regards to your questions, I have a couple of thoughts. I am assuming that you downloaded the source and compiled in on your system since there does not seem to be an OS X binary (if there is an OS X binary, not just the 68, FAT and PPC ones... ignore this whole migguided post). If you did not do this there could be several reasons why some of the functions are not working. If you are using the PPC (or FAT) version of the app, it may be Classic incompatibilities. Again, I've not used this product but from their documentation it seems that the Mac OS binaries are for pre-X versions of the OS (the newest version they say they've tested in is OS9). If you are using a port for an other UNIX (or compiled the source), the gvim version requires X Windows. I cat-ed the pkg-descr in the ports tree on my FreeBSD box. And well, here is what it told me (minus the working hyper-links of course):

Vim is a virtually compatible, extreamly enhanced, version of the UNIX text editor vi. There are a lot of enhancements above Vi: multi level undo, multi-windows and buffers, syntax highlighting, command line editing, filename completion, on-line help, visual selection, etc.. Many features above standard vi's have been added: multiple windows and buffers, multi level undo, command line history, filename completion, selection highlighting, block operations (including column/rectangular blocks), syntax highlighting, on-line help, etc. Embeded Perl, Tcl, and Python support. See ":help vi_diff" for a summary of the differences between Vim and Vi. An X-windows aware or a full X-windows GUI version can also be built that allows full use of the mouse and pull-down menus See http://www.vim.org/why.html for a full explanation of Vim's features. Portability to all UNIX platforms, AmigaOS, Archimedes, Atari MiNT, BeOS, M$-DOS, MacOS, OS/2, VMS, WinNT+Win95. -- David (obrien@cs.ucdavis.edu) WWW: http://www.vim.org/

As for the color not working on the term version, can't help you there. I have installed several things which use color (such as GNU fileutils which is a must have) and they all work. However, I will ask my FreeBSD guru SO when he gets home and post any comments he has. Newt



[ Reply to This | # ]
VIM
Authored by: kjs on Feb 21, '12 01:12:45PM

Hi Newt,

Check out this link for a Vi Commandscheat sheet, hope that helps...

Cheers,
Keith



[ Reply to This | # ]
Getting VIM syntax colours
Authored by: bungee107 on May 01, '01 11:27:02PM

To get VIM syntax colours you need to have the ncurses libraries installed. You can get them from ftp.gnu.org or various mirrors of this archive. Download the source and compile it. Now recompile vim. You may need to set your TERM environment variable to an ansi terminal. Under the bash shell you do this by executing <TERM=ansi>, then <export TERM>. I don't know how to do it under csh/tcsh but I am sure it is simmilar if not the same. Setting your term to ansi has some other side affects. SSH requires a terminal that supports 'cursors'. ANSI terminals do but the termcap implimentation of 'ANSI' under MacOSX apparently doesn't. Fortunatly ssh will default to vt100 if it doesn't understand your terminal type.

frm

bungee@montana.com



[ Reply to This | # ]
Answered...
Authored by: babbage on May 02, '01 06:09:21PM
...in a more recent message posting.. You seem to want:

And install it as per the directions above. I've got syntax highlighting working fine now.

If you wanna play around with vim, you might like vi iMproved (vim). I just got it yesterday & it seems pretty comprehensive...

[ Reply to This | # ]