Created
March 10, 2014 10:24
-
-
Save JoeWoodward/9462600 to your computer and use it in GitHub Desktop.
Convert ruby to new syntax using vim. <leader>frs short for format ruby syntax
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
# format ruby syntax | |
# :symbol => 'with rocket' | |
# will be converted to | |
# symbol: 'without rocket' | |
function! s:FormatRuby() | |
silent! execute '%s/:\(\w\+\)\ =>/\1: /g' | |
endfunction | |
command! -range=% frs call <SID>FormatRuby() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment