%w(hashrockets spaceships bangbangs)

> non-optimized bits & pieces <

Quick Commenting of Ruby Code

What is the fastest way to comment a block of ruby code ?? Sorry, i’m too fast, no time to wait, let’s install the extra plugins 1st:

1
2
3
4
$ cd ~/.vim/bundle
$ git clone https://github.com/kana/vim-textobj-user.git
$ https://github.com/nelstrom/vim-textobj-rubyblock.git
$ https://github.com/tomtom/tcomment_vim.git

To comment an entire method, goto anywhere of that method, var & gc.

To comment the inner content of a method, again anywhere of that method, vir & gc.

Sorry, too fast & too sweet ?? See this vimcast to learn more abt var & vir :)

tips, vim

Comments