Vim Tips Wiki
We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 3: Line 3:
 
|id=239
 
|id=239
 
|previous=238
 
|previous=238
|next=241
+
|next=240
|created=2002
+
|created=May 2, 2002
 
|complexity=basic
 
|complexity=basic
 
|author=Larry Clapp
 
|author=Larry Clapp
|version=6.0
+
|version=5.7
 
|rating=6/5
 
|rating=6/5
 
|category1=
 
|category1=
 
|category2=
 
|category2=
 
}}
 
}}
You can make Vim scroll the text using the shifted up/down arrows by mapping Shift-Up to Ctrl-Y and Shift-Down to Ctrl-E.
+
You can make Vim scroll the text using the shifted up/down arrows, sort of like your browser (except with shifted keys :), by mapping Shift-Up to Ctrl-Y and Shift-Down to Ctrl-E.
  +
 
<pre>
 
<pre>
map &lt;S-Down> <C-E>
+
map &lt;s-Down> <C-E>
map &lt;S-Up> <C-Y>
+
map &lt;s-Up> <C-Y>
 
</pre>
 
</pre>
   
Line 26: Line 27:
 
map <Down> <c-e>
 
map <Down> <c-e>
 
map <Up> <c-y>
 
map <Up> <c-y>
map &lt;S-Down> j
+
map &lt;s-down> j
map &lt;S-Up> k
+
map &lt;s-up> k
 
</pre>
 
</pre>
   
Vim by default maps S-Down and S-Up to Ctrl-F and Ctrl-B, for both normal and visual mode. Keep this in mind if you change some of the above mappings to "nmap", because you'll probably also want to look in to "vmap".
+
Vim by default maps s-Down and s-Up to Ctrl-F and Ctrl-B, for both normal and visual mode. Keep this in mind if you change some of the above mappings to "nmap", because you'll probably also want to look in to "vmap".
   
 
==References==
 
==References==
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)