[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Looking for good Ruby and Rails configuration for vim

Xeno Campanoli

2/27/2008 9:45:00 PM

I am afraid I really like vi, but I would like some syntax highlighting,
indentation, and block skeleton stuff like Dave and David recommend on
page 27 of their agile book. I wonder if I make a wish here whether
some wonderful guru might post the vim configuration from heaven for
Rails and Ruby???

Sincerely, Xeno
--
The only sustainable organizing methods focus not on scale,
but on good design of the functional unit,
not on winning battles, but on preservation.

4 Answers

Martin DeMello

2/27/2008 10:00:00 PM

0

On Wed, Feb 27, 2008 at 1:44 PM, Xeno Campanoli <xcampanoli@gmail.com> wrote:
> I am afraid I really like vi, but I would like some syntax highlighting,
> indentation, and block skeleton stuff like Dave and David recommend on
> page 27 of their agile book. I wonder if I make a wish here whether
> some wonderful guru might post the vim configuration from heaven for
> Rails and Ruby???

first, get the vim-ruby gem:

gem install vim-ruby

then go through the following guide and see what else seems useful:

http://wiki.rubyonrails.org/rails/pages/HowtoUseVi...

martin

Arlen Cuss

2/28/2008 12:02:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

I have these set in my local .vimrc:

set sw=2
set smartindent
set smarttab

It sets two space 'virtual' tabs (so when you hit tab, it inserts two
spaces, and when you hit backspace on whitespace at the beginning of the
line, it takes two spaces - series of 8 are converted to real tabs). In my
global vimrc, these are set:

syntax on
set showcmd
set showmatch
set smartcase
set incsearch
set mouse=a

This enables syntax highlighting, shows commands as you type them in the
status bar, highlights matched text as you enter it while searching (with
`/'), sets the case matching to `smart' (no idea about the semantics, try
:help smartcase), sets searches to start from where your cursor is, and
enables mouse usage in consoles that allow it.

Cheers,
Arlen.

Xeno Campanoli

3/1/2008 12:26:00 AM

0

Martin DeMello wrote:
> On Wed, Feb 27, 2008 at 1:44 PM, Xeno Campanoli <xcampanoli@gmail.com> wrote:
>> I am afraid I really like vi, but I would like some syntax highlighting,
>> indentation, and block skeleton stuff like Dave and David recommend on
>> page 27 of their agile book. I wonder if I make a wish here whether
>> some wonderful guru might post the vim configuration from heaven for
>> Rails and Ruby???

Thank you for your help.
>
> first, get the vim-ruby gem:
>
> gem install vim-ruby
>
> then go through the following guide and see what else seems useful:
>
> http://wiki.rubyonrails.org/rails/pages/HowtoUseVi...
>
> martin
>
>


--
The only sustainable organizing methods focus not on scale,
but on good design of the functional unit,
not on winning battles, but on preservation.

Xeno Campanoli

3/1/2008 12:26:00 AM

0

Arlen Cuss wrote:
> I have these set in my local .vimrc:
>
> set sw=2
> set smartindent
> set smarttab
>
> It sets two space 'virtual' tabs (so when you hit tab, it inserts two
> spaces, and when you hit backspace on whitespace at the beginning of the
> line, it takes two spaces - series of 8 are converted to real tabs). In my
> global vimrc, these are set:
>
> syntax on
> set showcmd
> set showmatch
> set smartcase
> set incsearch
> set mouse=a
>
> This enables syntax highlighting, shows commands as you type them in the
> status bar, highlights matched text as you enter it while searching (with
> `/'), sets the case matching to `smart' (no idea about the semantics, try
> :help smartcase), sets searches to start from where your cursor is, and
> enables mouse usage in consoles that allow it.
>
> Cheers,
> Arlen.
>
Thank you also Arlen.

--
The only sustainable organizing methods focus not on scale,
but on good design of the functional unit,
not on winning battles, but on preservation.