Re: Vim tutorials

Ramin K <[email protected]>
Newsgroups gmane.org.user-groups.luni.tech
Message-ID <[email protected]>
On 1/7/2011 9:27 AM, Eric MacAdie wrote:
> Can anyone recommend a few good vim tutorials?
>
> Eric MacAdie
> Pronounced: muh-KAY-dee
>

I can't really recommend a vim tutorial, but if you're using vim heavily 
for work you'll want to do a few things.

1. Make sure you've installed vim-enhanced or turned on vim.basic. Some 
distos ship a simplified vim by default and you'll need to turn on or 
install more functionality.

2. Your own .vimrc in your home dir. Allows you to the turn on the 
ruler, set line numbers down the side, pick your colors, enable syntax 
files, set tabs, turn off the audio bell, etc. You can also map 
commands. My favorite is this one which allows me to edit a file with my 
environment settins and then sudo write it to disk. "For when w! won't 
work, use w!!"

cmap w!! w !sudo  tee % >/dev/null

3. Your own ~/.vim/ to keep all those colors, syntax files, etc. At my 
last job I had NFS mounted home dirs so I can load everything I want 
into .vim/ and have it on each machine without mucking around on each 
machine. At my current job I rsync .vim to each machine which is a 
little annoying.
	The reason for all this work is really syntax highlighting. You make 
far far fewer mistakes when half your config file turns purple because 
you're missing a " or } or ] somewhere.
	Additionally you can set a local .vim/tmp/ in your .vimrc so swap files 
aren't out in the wild. You can also auto backup into .vim/backup/ if 
you set that in your .vimrc.

Good luck and I hope some of this helps.

Ramin
-- 
Linux Users Of Northern Illinois (Chicago) - Technical Discussion 
http://luni.org/mailman/listinfo/luni
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.