Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pretty VIM vs. Dull VIM - config file?

Status
Not open for further replies.

thedaver

IS-IT--Management
Jul 12, 2001
2,741
US
I use VIM on a RedHat 9 box and it appears to have a global setting that uses colors, which is especially useful when working on PHP code on a remote box. It's all "smart" about discerning between functions, reserved words, comment blocks, etc. I love it. (no sniggering about why I use VIM for code pounding).

I'm now on a Debian box that, in true Debian style, is the plainest, least inviting incarnation of VIM I've ever seen.

Q: Where are/What are the settings or config file that I should copy or port from the RH box to Debian in order to gain the same colorized functionality?

Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
User config files are $HOME/.vimrc and/or $HOME/.gvimrc (or possibly even $HOME/.exrc if you want to share some settings with other Vi clones). I'm not sure about system-wide config files on UNIX, as I've never touched them.

To turn on syntax highlighting, you can just add the line
Code:
syntax on
to your $HOME/.vimrc file. I don't know what configuration RedHat ships, but Vim comes with several example files under /usr/share/vim (or something like that) that you might want to use for reference.
 
Just worth mentioning here. There's a decent collection of configuration files available. Specifically, the editor files are here.

Also, a google for '.vimrc' will turn up a few goodies too.

----
JBR
 
Here is my VIM config, it's quite the gnarly awesome. Fixes a few minor hinderances when in input mode, and includes syntax highlighting... anything else in it, since it's been too long to remember exactly what it does, you can either look in the man page, or somewhere online, but everything I've ever needed in a vim config is there, and it's pretty (I do a LOT of coding, and it never misses a beat).

root@zombie:~# cat .vimrc
set nocompatible
set bs=2
set history=50
set ruler

if &t_Co > 1
syntax on
endif
root@zombie:~#

The weevil of doooooooooom
-The eagle may soar, but the weasel never gets sucked up by a jet engine (Anonymous)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top