History Report a problem
Article Edit this page Discussion

Fast scroll mappings

From Vim Tips Wiki

(Redirected from VimTip400)
Jump to: navigation, search
 

Tip 400Previous TipNext Tip

Created: January 13, 2003 Complexity: basic Author: John Sumsion Minimum version: 6.0 Karma: -1/1 Imported from: Tip#400


" allow Alt-[movement keys] to scroll window
if !has("gui_running")
  nmap ^[l <A-l>
  nmap ^[h <A-h>
  nmap ^[k <A-k>
  nmap ^[j <A-j>
  vmap ^[l <A-l>
  vmap ^[h <A-h>
  vmap ^[k <A-k>
  vmap ^[j <A-j>
  imap ^[l <A-l>
  imap ^[h <A-h>
  imap ^[k <A-k>
  imap ^[j <A-j>
endif

" To have <A-h> available for the mappings below, search menu.vim for the
" first instance of &Help and change it to Hel&p so that <Alt-H>
" isn't used for the GUI Help menu
nmap <A-l> 4zl
nmap <A-h> 4zh
nmap <A-k> <C-y>
nmap <A-j> <C-e>
vmap <A-l> 4zl
vmap <A-h> 4zh
vmap <A-k> <C-y>
vmap <A-j> <C-e>
imap <A-l> <C-o>4zl
imap <A-h> <C-o>4zh
imap <A-k> <C-x><C-y>
imap <A-j> <C-x><C-e>

[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
Terminator Wiki
Legend of Zelda Wiki
Flash Gordon
Everquest II Wiki
Yo-Yo Wiki
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Fast scroll mappings"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation