sponsor Vim development Vim logo Vim Book Ad

ruby-macros.vim : macros for the ruby language

 script karma  Rating 48/26, Downloaded by 4101    Comments, bugs, improvements  Vim wiki

created by
Carl Mueller
 
script type
ftplugin
 
description
This plugin is for editing ruby files.

Typing "for" on a blank line will result in

for  in  
end

with the cursor positioned before the "in".  
The same will happen with "while", "until",
and so on.  But if the line is not blank,
"for" will just insert itself.

Also, symbols like " are inserted in matching
pairs, with the cursor in between.

"K" runs ruby on the current buffer, and
the "F1" function key puts a line
#!/usr/math/bin/ruby
on the first line.  (You will have to edit
this part).
 
install details
Put something like the following line in your .vimrc file:

autocmd Filetype ruby source ~/.Vim/ruby-macros.vim

or put this in an ftplugin directory in your runtime path.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
ruby-macros.vim 1.2 2002-07-26 6.0 Carl Mueller Fixed a mistake with the matched
insertion of brackets.
ruby-macros.vim 1.01 2001-12-18 6.0 Carl Mueller Renamed file, so it doesn't conflict
with the ruby.vim syntax file.
ruby-macros.vim 1.01 2001-12-17 6.0 Carl Mueller Fixed the macros for automatically
completing constructions like
\\\"if .. end\\\".
ruby-macros.vim 1.0 2001-12-03 6.0 Carl Mueller Initial upload
ip used for rating: 54.196.225.45

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo