vim-ruby installation

D

dylans

I've read though a bunch of the vim-ruby posts in this group, and
others, and still can't get my vim-ruby installation functioning
properly. Here is what I've done:

1) Installed the latest vim-ruby from RubyForge
Did an "ruby gem vim-ruby", ran the "vim-ruby-install.rb".
Now, I have the necessary ruby'esque files in my VIM installation
directory... ie:

/usr/share/vim/vim63/syntax
/usr/share/vim/vim63/ftplugin
/usr/share/vim/vim63/ftdetect
/usr/share/vim/vim63/compiler
/usr/share/vim/vim63/indent

I also confirmed that /usr/share/vim/vim63/filetype.vim has the proper
line that identifies ruby files by the given extensions (*.rb, *.gem,
*.ruby)


2) I then created a .vimrc file in my home directory, and added the
following, as per the instructions on the vim-ruby page:

set nocompatible
syntax on
filetype on
filetype indent on
filetype plugin on


3) Now, it doesn't work.
When I vim a ruby file, it does have the proper colors, but when I hit
"Tab", it inserts an actual Tab instead of 2 spaces, and things like
autocompleting "IF's" doesn't work by doing the Shift+Enter
combination.
So, the colors are correct... but nothing else !

Any help would be greatly appreciated !
 
H

Harpo

When I vim a ruby file, it does have the proper colors,

It depends on what colors you like.
but when I hit
"Tab", it inserts an actual Tab instead of 2 spaces,

It seems to be a vim problem, but I don'have the vim NG in mind.
Well, I do not do this everyday, you have to set expandtab
:set expandtab
:set shiftwidth=2
I'm not sure of the syntax....
This should be in vim configuration files probably in a ftplugin
directory, this is very complicated but I think that the files
like .vimre .vim in your home directory are taken in account before the
others but I do not remember who overrides who.

But I'm sure it is something like that, in doubt hit the F1 key.
 
D

dylans

Tim and Harpo... thank you !

I didn't realize that this vim-ruby package didn't take care of these
tihngs... even though I'd think that all Ruby users would want a 2
space indent... no ?

Also, thanks for pointing out that mailing list... didn't realize it
existed. Thanks again !!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top