Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

Im wondering if is there any way to go word by word using Ctrl + -> as in the rest of the editors.

share|improve this question

migrated from Jul 2 '13 at 10:40

This question came from our site for professional and enthusiast programmers.

Did you even try? – romainl Jul 1 '13 at 20:11
If your editor must do just like other editors, vim is not for you. The vim way to move forward one word is w from normal mode (back is b). This was stated in the answer by Amit. – cforbish Jul 2 '13 at 3:18
up vote 5 down vote accepted

Try using w for moving word by word. Wordwise motions are faster in vim. The w, b, e, and ge commands allow us to move forward or backward to the start or end of a word. see :help word in vim for more information.

Here's a link to an excellent answer on vim misuse:

share|improve this answer

After looking at this on multiple computers...

On Linux using Gnome Terminal this feature works right out of the box. (which is why romainl asks if you tried it)

On Mac OS 10.8 (Mountain Lion)

Control + Arrow Key gets caught by Mission Control and change spaces or move the screen around. To disable this go to System Preferences -> Keyboard -> Keyboard Shortcuts -> Mission Control and uncheck all the ones that have ctrl + arrow (Control is represented with a ^)

After this is done. Ctrl + Arrow works in iTerm2 with no fiddling in vim.

It however does not work immediately in vim in Terminal. For some reason control + arrow corresponds to delete till end of line. (Which seems to be the same behavior as in bash).

To fix this you need to change what Terminal sends as a character string when Control Left and Control Right are sent.

In Terminal go to Preferences -> Settings -> (Profile you are using) -> Keyboard

Edit control cursor left to be \033[1;5D and edit control cursor right to be \033[1;5D. (Note: \033 is entered by hitting ESC)

After these changes are made you should be able to use Control Left and Control Right to move forward or backwards words.

Also while Control Left and Control Right there are equivalent one letter commands to do the same in normal mode. (<C-Left> is Control + Left and <S-Left> is Shift + Left)

<C-Left>  == B    <S-Left>  == b
<C-Right> == W    <S-Right> == w

Take a look at :h b and :h w

(Note: <S-Left> and <S-Right> might not work in Termianl unless you change what Terminal sends)

share|improve this answer

You must log in to answer this question.

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