Stop Microsoft
Operating Systems => Linux and UNIX => Topic started 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.
-
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)
-
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
-
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 ;)
-
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.
-
emacs doesn't suck...it BLOWS
-
sorry, emacs is awsome, it autoindents, adn does other great things. vim is ok, but i just prefer emacs, besides emacs is gnu.
-
and the thing about linux/gnu system being three operating systems, that was a joke
-
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)
-
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.
-
.