Created
February 27, 2012 15:18
-
-
Save waffle2k/1924514 to your computer and use it in GitHub Desktop.
vimrc snipped
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
" Strip down to just the IP address in the highlighted region | |
function! ExtractIP() | |
'<,'>perldo $_ = $1 if /((?:\d+\.){3}\d+)/; | |
endfun | |
vmap <silent> <C-i> <Esc>:call ExtractIP()<CR> | |
function! SortUniq() | |
'<,'>sort | |
'<,'>g/^\(.*\)$\n\1$/d | |
endfun | |
vmap <silent> <C-u> <Esc>:call SortUniq()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment