Brian's Waste of Time

Tue, 25 Jan 2005

Vim...

Does Ruby auto-complete =) Rock on!

Add the following to your .vimrc:

function InsertTabWrapper()
    let col = col('.') - 1
    if !col || getline('.')[col - 1] !~ '\k'
        return "\<tab>"
    else
        return "\<c-p>"
    endif
endfunction

Then use ctrl-p to autocomplete

Many thanks to bougeyman in #rubyonrails

1 writebacks [/src] permanent link