Replacing old style ruby hashes in Vim. (Updated)
You can use the following command in Vim, in normal mode to replace old style Ruby hashes into new style ruby hashes.
Update, a slightly better substitution command, which adds a space after `key:` regardless of the source string.
%s/:\(\w\+\)\(\s\==>\)/\1:/gc
Update, a slightly better substitution command, which adds a space after `key:` regardless of the source string.
%s/\V:\(\w\+\)\(\s\*\)\(=>\)\(\s\*\)/\1: /gc
