On 10/20/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
Akbar wrote: > Hi, I use vim7 ( compiled from source ) > > This is my situation: > open bla.rb > > def bla ( type def bla, enter ) > print "bla" ( type two spaces and print "bla", enter ) > print "bli" ( no need to type two spaces, sweet, type print > "bli", enter ) > end ( type end, enter ) > > I want my vim do this: after I press enter ( after typing end ), the > word end will indent to left automatically aligning with word def. How > do I do that? > > Thank you. >If there is a $VIMRUNTIME/indent/ruby.vim script which provides for it, all you need may be to make sure that your vimrc includes one of the following lines (each of which is enough by itself): runtime vimrc_example.vim or source $VIMRUNTIME/vimrc_example.vim or filetype indent on or filetype plugin indent on One way to check whether you have enabled filetype-related indentation is to enter the ":filetype" command with no arguments. If the reply includes "indent:ON" then the capability is enabled. Best regards, Tony.
filetype indent on do the trick. Thank you. ( For Tony, sorry for the duplicate email )
