Friday, May 7, 2010

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

On 05/07/2010 10:31 PM, niobe 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} )
>
> Is this possible with vim?
>


Do :help 'isk'. It sets the range of ascii chars defined as keyword. You
might also want to look at an ascii chart (you can google for it), to
find the codes you'll need to add dots and digits. -ak

No comments: