FANDOM


(Remove the tip script, deprecated by vim option setting)
m (Fix link to help)
Line 17: Line 17:
 
This causes the cursorkeys, as well as h and l, to wrap, when used at beginning and end of lines (the <> and [] differ in that <> are the cursorkeys used in normal and visual mode, and the [] are the cursorkeys in insert mode).
 
This causes the cursorkeys, as well as h and l, to wrap, when used at beginning and end of lines (the <> and [] differ in that <> are the cursorkeys used in normal and visual mode, and the [] are the cursorkeys in insert mode).
   
See {{help|whichwrap}} for more info.
+
See {{help|'whichwrap'}} for more info.
 
}}
 
}}
   

Revision as of 11:58, September 27, 2007

Previous TipNext Tip

Tip: #137 - Automatically wrap left and right

Created: October 14, 2001 21:15 Complexity: basic Author: Brian Medley Version: 5.7 Karma: 9/5 Imported from: Tip#137

By default, when pressing left/right cursor keys, Vim will not move to the previous/next line after reaching first/last character in the line. This can be quite annoying for new users. Fortunately this behaviour can be easily changed by putting this in your ~/.vimrc file:

set whichwrap=<,>,h,l,[,]

This causes the cursorkeys, as well as h and l, to wrap, when used at beginning and end of lines (the <> and [] differ in that <> are the cursorkeys used in normal and visual mode, and the [] are the cursorkeys in insert mode).

See :help 'whichwrap' for more info.

Comments

Community content is available under CC-BY-SA unless otherwise noted.