Editing Ruby code in vim
From WhyNotWiki
Contents |
[edit]
vim-ruby / VimRubySupport
| Homepage: | http://vim-ruby.rubyforge.org/ |
|---|---|
| Documentation: | http://wiki.rubygarden.org/Ruby/page/show/VimRubySupport
|
| Project/Development: | http://rubyforge.org/projects/vim-ruby
|
| Readiness: | 5 - Production/Stable
|
http://wiki.rubygarden.org/Ruby/page/show/VimRubySupport
If you install Vim 7.x, the following Ruby support is enabled out of the box:
- syntax highlighting for Ruby and eRuby
- automatic, smart indenting for Ruby and eRuby
- compiler plugins for running Ruby, eRuby and Test::Unit files
- IntelliSense-like autocompletion (Vim 7 only - compiled with the Ruby interface)
The purpose of this article is to describe what these features are, how they work, and how you can add other Ruby features. The target readership is those who use Ruby and Vim, but are not sure how to get the most out of the combination.
...
While these files are included as part of the standard Vim distribution they tend to be updated more frequently than Vim itself. The latest can always be installed via RubyGems.
[edit]
Auto-add a matching end tag / closing } brace
http://software.pmade.com/blogs/ramblings/2006/06/02/vim_mapping_for_ruby
Want Vim to automatically insert a end for you when you type do ? ... I hacked his function so that it works with a normal newline, which is also a bit more natural.
I've included it into my vim scripts
[edit] Folding
http://eigenclass.org/hiki.rb?Usable+Ruby+folding+for+Vim eigenclass - Usable Ruby folding for Vim
http://eigenclass.org/hiki.rb?Usable+Ruby+folding+for+Vim+---+update+2 - Usable Ruby folding for Vim, second update
[edit] rcodetools
http://eigenclass.org/hiki.rb?rcodetools-screenshots
rcodetools: TDD/BDD++, automagic assertions, 100% accurate completion, doc/code browsing... (http://eigenclass.org/hiki.rb?rcodetools).
rcodetools is a collection of Ruby code manipulation tools. It includes xmpfilter and editor-independent Ruby development helper tools, as well as emacs and vim interfaces.
Currently, rcodetools comprises:
- xmpfilter: automagic Test::Unit assertions/RSpec expectations and code annotations
- rct-complete: 100% accurate method/class/constant etc. completion
- rct-doc: document browsing and code navigator
- rct-meth-args: precise method info (meta-prog. aware) and TAGS generation
[edit] taglist.vim
http://www.vim.org/scripts/script.php?script_id=273
- The "Tag List" plugin is a source code browser plugin for Vim and
provides an overview of the structure of source code files and allows you to efficiently browse through source code files for different programming languages.
[edit] Ctags support
[edit] A patch
http://sourceforge.net/mailarchive/forum.php?thread_id=5874613&forum_id=6668
[edit] Rails
Aliases: vim ruby, vim ruby support
