Author Topic: Vim  (Read 568 times)

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
Vim
« 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.

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Vim
« Reply #1 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
Someone please remove this account. Thanks...

dbl221

  • Member
  • **
  • Posts: 253
  • Kudos: 0
Vim
« Reply #2 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
dbl221***Comp-Sys walking wounded

choasforages

  • VIP
  • Member
  • ***
  • Posts: 1,729
  • Kudos: 7
    • http://it died
Vim
« Reply #3 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   ;)
x86: a hack on a hack of a hackway
alpha, hewlett packed it A-way
ppc: the fruity way
mips: the graphical way
sparc: the sunny way
4:20.....forget the DMCA for a while!!!

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Vim
« Reply #4 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.
Someone please remove this account. Thanks...

dbl221

  • Member
  • **
  • Posts: 253
  • Kudos: 0
Vim
« Reply #5 on: 12 August 2002, 03:43 »
emacs doesn't suck...it BLOWS
dbl221***Comp-Sys walking wounded

choasforages

  • VIP
  • Member
  • ***
  • Posts: 1,729
  • Kudos: 7
    • http://it died
Vim
« Reply #6 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.
x86: a hack on a hack of a hackway
alpha, hewlett packed it A-way
ppc: the fruity way
mips: the graphical way
sparc: the sunny way
4:20.....forget the DMCA for a while!!!

choasforages

  • VIP
  • Member
  • ***
  • Posts: 1,729
  • Kudos: 7
    • http://it died
Vim
« Reply #7 on: 12 August 2002, 19:39 »
and the thing about linux/gnu system being three operating systems, that was a joke
x86: a hack on a hack of a hackway
alpha, hewlett packed it A-way
ppc: the fruity way
mips: the graphical way
sparc: the sunny way
4:20.....forget the DMCA for a while!!!

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Vim
« Reply #8 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
Someone please remove this account. Thanks...

dbl221

  • Member
  • **
  • Posts: 253
  • Kudos: 0
Vim
« Reply #9 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.
dbl221***Comp-Sys walking wounded

Doogee

  • VIP
  • Member
  • ***
  • Posts: 774
  • Kudos: 109
    • http://m-db.info
Vim
« Reply #10 on: 16 November 2002, 07:03 »
.