Hi,

I use a setting like that in my .vimrc file.

if has("autocmd")

  augroup ruby
    au BufReadPre,FileReadPre set kp=ri sw=2 ts=2 expandtab
  augroup END

endif

With some more settings for Python, Perl and so on. And I would also
suggest to active autoindent and smartindent. :)

Best regards,
Oliver

On Thu, Jan 05, 2006 at 09:23:23PM +0900, John Maclean wrote:
> Hi guys,
> 
> This has probably been done before but I've looked through 5000+ emails and I've not seen a simple solution. I'd like to have two space indentation for *.rb files or those whose first line begins with !#/usr/bin/ruby. At the moment vim gives me eight spaces, (or is it a tab?).
> 
> I have the following lines in ~./vimrc
> 
> set nocompatible
> syntax on
> filetype plugin indent on
> filetype indent on    " Enable filetype-specific indenting
> filetype on           " Enable filetype detection
> 
> I also have the following files;
> /usr/share/vim/vim63/ftplugin/ruby.vim
> /usr/share/vim/vim63/compiler/ruby.vim
> /usr/share/vim/vim63/indent/ruby.vim 
> /usr/share/vim/vim63/syntax/ruby.vim
> 
> -- 
> 
> John Maclean
> MSc (DIC)
> 07739 171 531
> 

-- 
Oliver Andrich --- oliver.andrich / gmail.com --- http://roughbook.de/