Created
November 8, 2012 00:57
-
-
Save dayyan/4035715 to your computer and use it in GitHub Desktop.
Regular Expression Vim: Capistrano role from server IP paste with comments for internal IPs from Chef
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
:'<,'> s/x\(.*ACTIVE | \)\(.\{-}\d\)\s*| \(.*\)/role :app, '\2', # \1 \3/ | |
turns | |
x| 1111 | yyy-yyy-staging-app83 | ACTIVE | 192.168.0.1 | 10.10.10.10 | | |
to | |
role :app, '192.168.0.1' # | 1111 | xxx-xxx-staging-app83 | ACTIVE | 10.10.10.10 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment