History Report a problem
Article Edit this page Discussion

Automatically wrap left and right

From Vim Tips Wiki

Jump to: navigation, search

Tip 137 Previous TipNext Tip

Created: October 14, 2001 Complexity: basic Author: Brian Medley Minimum 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 left and right arrow keys, as well as h and l, to wrap when used at beginning or end of lines. ( < > are the cursor keys used in normal and visual mode, and [ ] are the cursor keys in insert mode).

[edit] References

[edit] Comments

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Pushing Daisies
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Astronomy Wiki
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions


Vote for featured Wikia!

Send this article to a friend
"Automatically wrap left and right"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation