Tuesday, December 10, 2013

Re: Selecting an IPv4-address?

On Tuesday, December 10, 2013 12:52:41 PM UTC-6, Tim Chase wrote:
> On 2013-12-10 14:13, Niels Kobschätzki wrote:
>
> > Hi,
>
> >
>
> > I have a short question. What is the fastest way to select an
>
> > IPv4-address like 192.168.1.100 for copy/cut&paste?
>
>
>
> If you want to get really fancy, you could do something like
>
>
>
> :nnoremap <leader>ip w?\%(\d\{1,3}\.\)\{3}\d\{1,3}?e<cr>v??<cr>
>
>
>
> The only edge case I know of is if the IP address falls at the end of
>
> the file.
>

If you're going to start using regular expressions, I'd just match the whole IP and use gn on it.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment