Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
This is borderline a question since it's mostly programmers who use vim, you'll have better luck getting it answered there. – Charles Ma Jul 25 '09 at 5:01
@cma Okay moved question here:… – leeand00 Jul 25 '09 at 12:29
up vote 1 down vote accepted

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


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

share|improve this answer
Wow that's a better answer then I got over on Stackoverflow (almost the same but better! Thanks! – leeand00 Jul 27 '09 at 23:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.