Stop Microsoft

Operating Systems => Linux and UNIX => Topic started by: TheQuirk on 2 August 2002, 23:12

Title: Vim
Post by: TheQuirk on 2 August 2002, 23:12
How do you make vim auto indent code? I'm tired of quitting and then running "indent" and then launching vim again. I know this is possible, I just don't know how.
Title: Vim
Post by: voidmain on 3 August 2002, 04:30
Although I prefer to use spaces (some prefer tabs), and prefer to manually space my code while I write it there are intent features of vim.  Search google for "vim indent source code". Here is the first link that popped up with some info on the subject:

http://vim.sourceforge.net/tips/tip.php?tip_id=83 (http://vim.sourceforge.net/tips/tip.php?tip_id=83)
Title: Vim
Post by: dbl221 on 3 August 2002, 07:46
Autoindentation is covered on pg 72 of Vi IMproved-Vim by Steve Oualline New Riders Press isbn=0-7357-1001-5

put :set sutoindent in your $HOME/.gvimrc or .vimrc

good luck
Title: Vim
Post by: choasforages on 4 August 2002, 12:18
hmmmm, use emacs, i used to hate it cuase it was fucking huge, then i played with it, and it works the same on all platforms unlike vim. the solarise admin seems to think that a gnu/linux system is really three operating systems in one

LINUX
X11R6
EMACS


then agian, he has stared at the sun way too long   ;)
Title: Vim
Post by: voidmain on 4 August 2002, 18:19
Huh?  Solaris is no different than Linux in that respect. And vim is not different on each platform, now "vi" is a different story. And emacs sucks.
Title: Vim
Post by: dbl221 on 12 August 2002, 03:43
emacs doesn't suck...it BLOWS
Title: Vim
Post by: choasforages on 12 August 2002, 19:38
sorry, emacs is awsome, it autoindents, adn does other great things. vim is ok, but i just prefer emacs, besides emacs is gnu.
Title: Vim
Post by: choasforages on 12 August 2002, 19:39
and the thing about linux/gnu system being three operating systems, that was a joke
Title: Vim
Post by: voidmain on 12 August 2002, 20:54
O'Reilly's reasons for switching from emacs to vi are pretty much the same reasons I prefer vi, and vim provides even more features above vi that I really like.  I can go to any UNIX system and be extremely proficient in editing files without having to install any other software.  See Tim O'Reilly's reasons for switching from emacs to vi here:

http://www.oreilly.com/ask_tim/unix_editor.html (http://www.oreilly.com/ask_tim/unix_editor.html)
Title: Vim
Post by: dbl221 on 13 August 2002, 06:14
I think one of the best features of VIM over and
above VI is visual mode.  There are lots of others
but visual mode is one that most users can use
and appreciate vs some of the C, C++ coding type
features.

All joking aside VIM is the best.
Title: Vim
Post by: Doogee on 16 November 2002, 07:03
.