Antono Vasiljev

Autoindenting ruby code

Wed Feb 27 12:12:21 UTC 2008 [ Русский | English ]

I adopted a bit Ruby Script Beautifier to feet my needs and published it as a gem on rubyforge.org:

sudo gem install kode
ruby-code-indenter my-source.rb

This script can be integrated with vim, gedit, textmate, emacs or any other (clever enough) editor. If you are vim fanboy you can add this line to your ~/.vimrc

nmap <leader>rci :%!ruby-code-indenter<cr>

and use \rci in normal mode to indent ruby code.

See screencast:

Автоотступы в ruby
OGG ~1.5Mb

Suggestions, patches and integration tips are welcome.

Спасибо Ссылку на Script Beautifier поправить бы

Bonvolu ensaluti per OpenID por publicii komentojn.