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 15: Line 15:
   
 
<pre>
 
<pre>
nmap <silent> <M-Down> :call ScrollOtherWindow("down")<CR>
+
nmap &lt;silent&gt; &lt;M-Down&gt; :call ScrollOtherWindow("down")&lt;CR&gt;
nmap <silent> <M-Up> :call ScrollOtherWindow("up")<CR>
+
nmap &lt;silent&gt; &lt;M-Up&gt; :call ScrollOtherWindow("up")&lt;CR&gt;
   
 
fun! ScrollOtherWindow(dir)
 
fun! ScrollOtherWindow(dir)
 
if a:dir == "down"
 
if a:dir == "down"
let move = "\<C-E>"
+
let move = "\&lt;C-E&gt;"
 
elseif a:dir == "up"
 
elseif a:dir == "up"
let move = "\<C-Y>"
+
let move = "\&lt;C-Y&gt;"
 
endif
 
endif
exec "normal \<C-W>p" . move . "\<C-W>p"
+
exec "normal \&lt;C-W&gt;p" . move . "\&lt;C-W&gt;p"
 
endfun
 
endfun
 
</pre>
 
</pre>
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)