tags:

views:

499

answers:

3

Is it possible to specify the symbols where cursor will stop after pressing Ctrl-Left/Ctrl-Right keys in VIM? Is it possible to make it's behaviour like in windows? Cursor jumps too far when using these combinations. Also, 'b'/'e' keys help a bit but they make cursor to jump to shorter distance. Thanks.

+1  A: 

from the vim help :help word

                              *word*

A word consists of a sequence of letters, digits and underscores, or a sequence of other non-blank characters, separated with white space (spaces, tabs, ). This can be changed with the 'iskeyword' option. An empty line is also considered to be a word.

Jeff Walker
The default setting is the next iskeyword=@,48-57,_,192-255
Vereb
Thanks!It didn't helped me a lot, but thanks to your answer I came across the difference between inclusive and exclusive motions. All I needed is to use exclusive motions:Shift-Right/Shift-Left or w/WThanks!
igorp1024
+1  A: 

I'd recommend to use the vim-typical commands like w/W/b/B/e/E/ge/gE/f/F/t/T instead of the arrow keys. The arrow keys are far away from your keyboard home row and will slow you down.

More help on important movement commands:

:h word-motions
:h object-motions
:h left-right-motions
kongo2002
Sure, but as for me it's more convenient to find Shift or Ctrl key without watching on the keyboard than to find w/Shift-w.p.s. No holy wars. Just my own impressions. :)
igorp1024
A: 

Hi kongo2002, I want to use ctrl+arrow keys becouse it can work in insert mode too...

my problem is, that if I map C-Right to sequence esc-e-i (or whatever) it always insert weird delay between interpreting map...

I press Ctrl+RightArrow, vim waits about 2 seconds and then finally jump one word to the right. Why is that? (I'm using Ubuntu... if this matter)

Thanks a lot for any suggestions!

Andrej Mikulik