[ANN] Vim/Ruby Configuration Files, 2004.09.20

Hi all,

Many Vim users will be aware of this RubyForge project:

  http://vim-ruby.rubyforge.org/

It contains several configuration files that make Vim work better with
Ruby. The files in this release represent a significant improvement
over the ones in the Vim 6.3 release.

It's now easier than before to keep up to date with this project, so
long as you have RubyGems 0.8+ installed:

  $ gem install -r vim-ruby
  $ (sudo) vim-ruby-install.rb (--help)

A TGZ is also available. Installation instructions at the above link.

This installation mechanism is brand new. Please tread carefully,
especially with root access, and report any problems.
Ultra-conservative people should install the configuration files
manually :slight_smile:

Cheers,
Gavin

Last night I was wondering aloud on IRC why vim always unindented comments when I typed them on a blank line. I thought I'd fixed the problem at work, but couldn't remember how. Another guy had the same problem. After poking around a bit, I discovered that the problem was that I had smartindent turned on in my .vimrc. You really want nosmartindent when editing ruby files in vim.

- -- Eric Hodel - drbrain@segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

···

On Sep 19, 2004, at 9:29 AM, Gavin Sinclair wrote:

Hi all,

Many Vim users will be aware of this RubyForge project:

  http://vim-ruby.rubyforge.org/

It contains several configuration files that make Vim work better with
Ruby. The files in this release represent a significant improvement
over the ones in the Vim 6.3 release.

I guess that's something I can add to ftplugin/ruby.vim then:

  set <buffer> nosmartindent

(Or whatever the correct syntax is.)

Gavin

P.S. I've been wondering that too!

···

On Monday, September 20, 2004, 3:58:03 AM, Eric wrote:

On Sep 19, 2004, at 9:29 AM, Gavin Sinclair wrote:

Hi all,

Many Vim users will be aware of this RubyForge project:

  http://vim-ruby.rubyforge.org/

It contains several configuration files that make Vim work better with
Ruby. The files in this release represent a significant improvement
over the ones in the Vim 6.3 release.

Last night I was wondering aloud on IRC why vim always unindented
comments when I typed them on a blank line. I thought I'd fixed the
problem at work, but couldn't remember how. Another guy had the same
problem. After poking around a bit, I discovered that the problem was
that I had smartindent turned on in my .vimrc. You really want
nosmartindent when editing ruby files in vim.

* Gavin Sinclair <gsinclair@soyabean.com.au> [Sep 20, 2004 11:33]:

I guess that's something I can add to ftplugin/ruby.vim then:

Actually, I was looking at the wrong indent/ruby.vim. Please add
setlocal nosmartindent in indent/ruby.vim so that it is turned off
correctly. Sorry for shouting,
  nikolai

···

--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

* Gavin Sinclair <gsinclair@soyabean.com.au> [Sep 20, 2004 11:33]:

> Last night I was wondering aloud on IRC why vim always unindented
> comments when I typed them on a blank line. I thought I'd fixed the
> problem at work, but couldn't remember how. Another guy had the same
> problem. After poking around a bit, I discovered that the problem was
> that I had smartindent turned on in my .vimrc. You really want
> nosmartindent when editing ruby files in vim.

I guess that's something I can add to ftplugin/ruby.vim then:

  set <buffer> nosmartindent

Eh eh eh, that's already set by indent/ruby.vim...

  18:setlocal nosmartindent

So please don't put stuff pertaining to indentation in ftplugin.
There has to be something else going on. Either you're resetting it to
smartindent (why, oh why would you) or you're not loading the indent
files (filetype indent on) or something completely different.

In the old days doing =<motion> over a comment wouldn't reindent the
comment, as this would break indentation for other lines. This
non-feature has since been abolished.
  nikolai

···

--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}