Friday, May 7, 2010

Re: possible to change how vim defines a 'word'?

On Fri, May 7, 2010 at 10:31 PM, niobe <ben.carbery@gmail.com> wrote:
> Apparently uses the groups of the characters [a-zA-Z_] to define a
> word, e.g. for use by 'b' or 'w' commands.
>
> Since I work a lot with ip addresses I would like vim to be able to
> recognise a valid ip address and treat that as word too (a regexp for
> ip address would be [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} )

I don't know if it is or is not possible to do, but I know your regex
will never find it as is. you need:

[0-9]\+\{1,3}\.[0-9]\+\{1,3}\.[0-9]\+\{1,3}\.[0-9]\+\{1,3}

> Is this possible with vim?

--
"If the American people ever allow private banks to control the issue
of their money, first by inflation and then by deflation, the banks
and corporations that will grow up around them, will deprive the
people of their property until their children will wake up homeless on
the continent their fathers conquered."
-Thomas Jefferson

--
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

No comments: