From: "Michael Brailsford" <brailsmt / yahoo.com> > > > > My $VIM/ftplugin/ruby.vim: > > > > ==== cut ==== > > setlocal expandtab > > setlocal shiftwidth=2 > > setlocal softtabstop=2 > > setlocal tabstop=2 > > setlocal indentexpr=GetRubyIndent() > > setlocal tw=0 > > setlocal foldmethod=marker > > > > " when writing a buffer chmod it executable > > autocmd BufWritePost,FileWritePost * :silent !chmod 755 <afile> > > ==== cut ==== > > Those are basically what gets set when you enable filetype indenting > with ruby. The exceptions being expandtab and foldmethod, which should > be set in your .vimrc. > Setting expandtab and foldmethod in a filetype plugin is indeed appropriate, since it then applies to files of that type (in this case, Ruby). However, I would use the *user's* ftplugin directory, not the system one (small matter, I'm sure). i.e. ~/.vim/ftplugin/ruby.vim Gavin