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:
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 !
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:
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 hit "Tab", it inserts an actual Tab instead of
2 spaces,
The vim-ruby set of vim configuration files do not change the
tabstop/softtabstop/shiftwidth/et al options. As it says at
<http://www.rubygarden.org/ruby?VimRubySupport>, these are
inappropriate for a system-wide plugin, since they reflect user
preferences.
and things like autocompleting "IF's" doesn't work
by doing the Shift+Enter combination.
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.
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 !!