VIM vs. VI

As you probably know VI hasn’t been around in ages, rather VIM with VI settings is used. I was always torn between the two and finally settled on VI because 1.) I was too lazy to make my own .vimrc catered to my needs and 2.) its copy and paste wasn’t screwed up like VIM’s seemd to be. Read more about how I rectified this.

First off you need to decide what’s right for you and your needs. I program mostly in PHP and HTML. I didn’t like VIM syntax highlighting, but the benefits of using it are evident (ie. it will highlight correctly spelled functions reducing dumb spelling errors).

Another problem was the cut and paste was always fux0red in VIM. There are settings to rectify this I found out. You will also want to set your tab settings to your specific tastes (I use two spaces). Another thing you might want to think about is setting VIM to use SPACES for tabs instead of the evil ‘t’ character.

So here were my desires ….

  • Eliminate the cut & paste problem
  • Set my tab width to 2 spaces
  • Use spaces instead of ‘t’
  • I wanted to be able to backspace as much as I wanted while in INSERT mode
  • I wanted simple unintrusive syntax highlighting

Here is what I came up with – feel free to use it for yourself …

set noautoindent
set backspace=2
syntax on
set expandtab
set foldmethod=marker
set tabstop=2

hi Comment    ctermfg=Red guifg=#80a0ff
hi Constant   ctermfg=Gray guifg=#ffa0a0
hi Special    ctermfg=LightGray guifg=Orange
hi Function   ctermfg=DarkCyan guifg=Orange
hi Identifier ctermfg=DarkGreen guifg=#40ffff
hi Statement  ctermfg=white guifg=#ffff60
hi PreProc    ctermfg=Gray guifg=#ff80ff
hi Type       ctermfg=white guifg=#60ff60
hi Ignore     ctermfg=black guifg=bg

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.