This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" About: | |
" | |
" How often do you forget which keys you should use to select/modify strings | |
" in the ' or " or in other pairs? I often use viw/ciw instead of vi'/vi" for | |
" the first time because it easier for my fingers (but after that I remember | |
" about vi'). This script allows you always use the same shortcut for all | |
" cases. When you want to select string in the ' use viv. Do you want to | |
" select all in the '()'? Use viv. All in the '[]'? Use viv. | |
" | |
" How it works: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#require 'rubygems' | |
require 'pp' | |
#require 'ap' # Awesome Print | |
class Object | |
# expects [ [ symbol, *args ], ... ] | |
def recursive_send(*args) | |
args.inject(self) { |obj, m| obj.send(m.shift, *m) } | |
end | |
end |