2

I'm using VIM do alot of work for me using the macros.

There's alot of text in columns and I want the macro to move between columns effortlessly by pressing the w key to "move to the beginning of the next word"

For example:

DataSourceName            string                       ""   
DetailFields              []string                          
DynamicControlBorder      boolean                 empty  may be void 
EscapeProcessing          boolean                    True   
FetchDirection            long                       1000   
FetchSize                 long                         12   
Filter                    string                       ""   
GroupBy                   string                       ""   
HavingClause              string                       ""

However when I do this, VIM only does this for letters; whenever it encounters a "[" or a " it interprets this as another word, messing up the macro because it now appears that there is an additional column.

Is there any setting I can change to make vim ignore the special characters and treat them just like the letters by skipping over them?

2

1 Answer 1

1

You can change the definition of a word in vim by using

:set iskeyword=<specification>

Remeber to change it back, though, when you have finished with the special usage.

:set iskeyword?

will show the current usage. My terminal responds with

iskeyword=@,48-57,_,192-255

for all the letters a-z and A-Z (@), digits 0 to 9 (ASCII 48-57), underscore and international letters (ASCII 192-255)

1
  • Wow that's a better answer then I got over on Stackoverflow (almost the same but better! Thanks!
    – leeand00
    Jul 27, 2009 at 23:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .