From: 7stud 7stud Date: 2007-03-12T20:45:46+09:00 Subject: Re: I need to learn... 7stud 7stud wrote: > Morton Goldberg wrote: >> On Mar 12, 2007, at 4:13 AM, 7stud 7stud wrote: >> >> When I'm actually writing "serious" Ruby code, of course, I save it to a >> file in my text editor (I use Vim for that). I find that irb serves as >> an indispensable aid a lot of the time, however. Your mileage may vary. > > Is there a way to get Vim to automatically indent code? > I figured it out. lol. Lookie what I found: http://newbiedoc.sourceforge.net/tutorials/vim/personal-vim.html.en ------------- :ab abbreviation Full text, spaces are ok What happens is when you type the abbreviation in vim, as soon as you hit the space bar it is expanded to the full text. The abbreviation dmv in the prior example would expand to "Department of Motor Vehicles." If you close vim these settings are lost unless you commit them to your .vimrc file. ------------- Here's my new .vimrc file: set autoindent "keeps the indenting the same when you hit return" syntax on "turns on syntax highlighting ab sf someName "auto-completion sequence: type abbreviation, hit space bar to expand -- Posted via http://www.ruby-forum.com/.