-
-
Save rainux/1722405 to your computer and use it in GitHub Desktop.
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
" Highlight Ruby 1.8.x hash rocket | |
" This will prevent us to ever write it again | |
highlight ObsoleteHashRocket ctermbg=red guibg=red | |
au ColorScheme * highlight ObsoleteHashRocket guibg=red | |
au BufEnter * match ObsoleteHashRocket /\(:\w\+\s*\)\@<==>/ | |
au InsertEnter * match ObsoleteHashRocket /\(:\w\+\s*\)\@<==>/ | |
au InsertLeave * match ObsoleteHashRocket /\(:\w\+\s*\)\@<==>/ |
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
#!/usr/bin/ruby | |
Dir['**/*.{rb,erb}'].each do |filename| | |
content = File.read(filename) | |
File.open(filename, "w"){ |f| f.write content.gsub(/:([a-z0-9_]+)\s?=>/, "\\1:") } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment