使用vim编写ruby,需要安装一个小插件
安裝 vim-ruby
命令 gem i vim-ruby
之后执行vim-ruby-install.rb
最后将
添加到vimrc文件中,这就ok的啦
安裝 vim-ruby
命令 gem i vim-ruby
之后执行vim-ruby-install.rb
最后将
set nocompatible " We're running Vim, not Vi!
syntax on " Enable syntax highlighting
filetype plugin indent on " Enable filetype-specific indenting and plugins
" Load matchit (% to bounce from do to end, etc.)
runtime! macros/matchit.vim
augroup myfiletypes
" Clear old autocmds in group
autocmd!
" autoindent with two spaces, always expand tabs
autocmd FileType ruby,eruby,yaml set ai sw=2 sts=2 et
augroup END
添加到vimrc文件中,这就ok的啦