1
0
forked from aniani/vim

Add support for horizontal scroll wheel. (Bjorn Winckler)

This commit is contained in:
Bram Moolenaar
2010-07-25 15:49:07 +02:00
parent 0fe849a13b
commit 8d9b40e71a
23 changed files with 301 additions and 139 deletions

View File

@@ -275,7 +275,7 @@ o Keyboard
+ CTRL-^ in insert/replace mode toggles between Arabic/Latin mode
+ Keyboard mapping is based on the Microsoft's Arabic keymap (the
defacto standard in the Arab world):
de facto standard in the Arab world):
+---------------------------------------------------------------------+
|! |@ |# |$ |% |^ |& |* |( |) |_ |+ || |~ ّ |

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.3b. Last change: 2010 Jul 24
*if_pyth.txt* For Vim version 7.3b. Last change: 2010 Jul 25
VIM REFERENCE MANUAL by Paul Moore
@@ -337,12 +337,21 @@ sure edit "gvim.exe" and search for "python\d*.dll\c".
==============================================================================
7. Python 3 *python3*
Python 3 support can exist next to Python 2.x.
*:py3* *:python3*
The |:py3| and |:python3| commands work similar to |:python|.
*:py3file*
The |:py3file| command works similar to |:pyfile|.
*:py3* *:python3* *:py3file*
TODO
Vim can be built in four ways (:version output):
1. No Python support (-python, -python3)
2. Python 2 support only (+python or +python/dyn, -python3)
3. Python 3 support only (-python, +python3 or +python3/dyn)
4. Python 2 and 3 support (+python/dyn, +python3/dyn)
You can see that when Python 2 and Python 3 are both supported they must be
loaded dynamically. This may cause some problems though, therefore currently
inside a Vim executable you can only use Python 2 or Python 3. To switch to
the other one you need to restart Vim.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -136,10 +136,14 @@ tag char action ~
|i_<Help>| <Help> stop insert mode and display help window
|i_<Insert>| <Insert> toggle Insert/Replace mode
|i_<LeftMouse>| <LeftMouse> cursor at mouse click
|i_<MouseDown>| <MouseDown> scroll three lines downwards
|i_<S-MouseDown>| <S-MouseDown> scroll a full page downwards
|i_<MouseUp>| <MouseUp> scroll three lines upwards
|i_<S-MouseUp>| <S-MouseUp> scroll a full page upwards
|i_<ScrollWheelDown>| <ScrollWheelDown> move window three lines down
|i_<S-ScrollWheelDown>| <S-ScrollWheelDown> move window one page down
|i_<ScrollWheelUp>| <ScrollWheelUp> move window three lines up
|i_<S-ScrollWheelUp>| <S-ScrollWheelUp> move window one page up
|i_<ScrollWheelLeft>| <ScrollWheelLeft> move window six columns left
|i_<S-ScrollWheelLeft>| <S-ScrollWheelLeft> move window one page left
|i_<ScrollWheelRight>| <ScrollWheelRight> move window six columns right
|i_<S-ScrollWheelRight>| <S-ScrollWheelRight> move window one page right
commands in CTRL-X submode *i_CTRL-X_index*
@@ -441,10 +445,14 @@ tag char note action in Normal mode ~
|<S-Up>| <S-Up> 1 same as CTRL-B
|<Undo>| <Undo> 2 same as "u"
|<Up>| <Up> 1 same as "k"
|<MouseDown>| <MouseDown> scroll three lines downwards
|<S-MouseDown>| <S-MouseDown> scroll a full page downwards
|<MouseUp>| <MouseUp> scroll three lines upwards
|<S-MouseUp>| <S-MouseUp> scroll a full page upwards
|<ScrollWheelDown>| <ScrollWheelDown> move window three lines down
|<S-ScrollWheelDown>| <S-ScrollWheelDown> move window one page down
|<ScrollWheelUp>| <ScrollWheelUp> move window three lines up
|<S-ScrollWheelUp>| <S-ScrollWheelUp> move window one page up
|<ScrollWheelLeft>| <ScrollWheelLeft> move window six columns left
|<S-ScrollWheelLeft>| <S-ScrollWheelLeft> move window one page left
|<ScrollWheelRight>| <ScrollWheelRight> move window six columns right
|<S-ScrollWheelRight>| <S-ScrollWheelRight> move window one page right
==============================================================================
2.1 Text objects *objects*

View File

@@ -359,10 +359,14 @@ CTRL-G CTRL-J cursor one line down, insert start column *i_CTRL-G_CTRL-J*
<PageUp> move window one page up *i_<PageUp>*
<S-Down> move window one page down *i_<S-Down>*
<PageDown> move window one page down *i_<PageDown>*
<MouseDown> scroll three lines down *i_<MouseDown>*
<S-MouseDown> scroll a full page down *i_<S-MouseDown>*
<MouseUp> scroll three lines up *i_<MouseUp>*
<S-MouseUp> scroll a full page up *i_<S-MouseUp>*
<ScrollWheelDown> move window three lines down *i_<ScrollWheelDown>*
<S-ScrollWheelDown> move window one page down *i_<S-ScrollWheelDown>*
<ScrollWheelUp> move window three lines up *i_<ScrollWheelUp>*
<S-ScrollWheelUp> move window one page up *i_<S-ScrollWheelUp>*
<ScrollWheelLeft> move window six columns left *i_<ScrollWheelLeft>*
<S-ScrollWheelLeft> move window one page left *i_<S-ScrollWheelLeft>*
<ScrollWheelRight> move window six columns right *i_<ScrollWheelRight>*
<S-ScrollWheelRight> move window one page right *i_<S-ScrollWheelRight>*
CTRL-O execute one command, return to Insert mode *i_CTRL-O*
CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O*
CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L*

View File

@@ -242,7 +242,8 @@ This allows quick adjustment of the relative offset of 'scrollbind' windows.
When your mouse has a scroll wheel, it should work with Vim in the GUI. How
it works depends on your system. It might also work in an xterm
|xterm-mouse-wheel|.
|xterm-mouse-wheel|. By default only vertical scroll wheels are supported,
but some GUIs also support horizontal scroll wheels.
For the Win32 GUI the scroll action is hard coded. It works just like
dragging the scrollbar of the current window. How many lines are scrolled
@@ -250,24 +251,36 @@ depends on your mouse driver. If the scroll action causes input focus
problems, see |intellimouse-wheel-problems|.
For the X11 GUIs (Motif, Athena and GTK) scrolling the wheel generates key
presses <MouseDown> and <MouseUp>. The default action for these keys are:
<MouseDown> scroll three lines down. *<MouseDown>*
<S-MouseDown> scroll a full page down. *<S-MouseDown>*
<C-MouseDown> scroll a full page down. *<C-MouseDown>*
<MouseUp> scroll three lines up. *<MouseUp>*
<S-MouseUp> scroll a full page up. *<S-MouseUp>*
<C-MouseUp> scroll a full page up. *<C-MouseUp>*
presses <ScrollWheelUp>, <ScrollWheelDown>, <ScrollWheelLeft> and
<ScrollWheelRight>. For example, if you push the scroll wheel upwards a
<ScrollWheelUp> key press is generated causing the window to scroll upwards
(while the text is actually moving downwards). The default action for these
keys are:
<ScrollWheelUp> scroll three lines up *<ScrollWheelUp>*
<S-ScrollWheelUp> scroll one page up *<S-ScrollWheelUp>*
<C-ScrollWheelUp> scroll one page up *<C-ScrollWheelUp>*
<ScrollWheelDown> scroll three lines down *<ScrollWheelDown>*
<S-ScrollWheelDown> scroll one page down *<S-ScrollWheelDown>*
<C-ScrollWheelDown> scroll one page down *<C-ScrollWheelDown>*
<ScrollWheelLeft> scroll six columns left *<ScrollWheelLeft>*
<S-ScrollWheelLeft> scroll one page left *<S-ScrollWheelLeft>*
<C-ScrollWheelLeft> scroll one page left *<C-ScrollWheelLeft>*
<ScrollWheelRight> scroll six columns right *<ScrollWheelRight>*
<S-ScrollWheelRight> scroll one page right *<S-ScrollWheelRight>*
<C-ScrollWheelRight> scroll one page right *<C-ScrollWheelRight>*
This should work in all modes, except when editing the command line.
Note that <MouseDown> is used for scrolling the text down, this happens when
you turn the mouse wheel up!
Note that horizontal scrolling only works if 'nowrap' is set. Also, unless
the "h" flag in 'guioptions' is set, the cursor moves to the longest visible
line if the cursor line is about to be scrolled off the screen (similarly to
how the horizontal scrollbar works).
You can modify this behavior by mapping the keys. For example, to make the
scroll wheel move one line or half a page in Normal mode: >
:map <MouseDown> <C-Y>
:map <S-MouseDown> <C-U>
:map <MouseUp> <C-E>
:map <S-MouseUp> <C-D>
You can modify the default behavior by mapping the keys. For example, to make
the scroll wheel move one line or half a page in Normal mode: >
:map <ScrollWheelUp> <C-Y>
:map <S-ScrollWheelUp> <C-U>
:map <ScrollWheelDown> <C-E>
:map <S-ScrollWheelDown> <C-D>
You can also use Alt and Ctrl modifiers.
This only works when Vim gets the scroll wheel events, of course. You can
@@ -280,6 +293,10 @@ your mouse. For FreeBSD, this entry works for a Logitech scrollmouse: >
ZAxisMapping 4 5
See the XFree86 documentation for information.
*<MouseDown>* *<MouseUp>*
The keys <MouseDown> and <MouseUp> have been deprecated. Use <ScrollWheelUp>
instead of <MouseDown> and use <ScrollWheelDown> instead of <MouseUp>.
*xterm-mouse-wheel*
To use the mouse wheel in a new xterm you only have to make the scroll wheel
work in your Xserver, as mentioned above.
@@ -288,8 +305,8 @@ To use the mouse wheel in an older xterm you must do this:
1. Make it work in your Xserver, as mentioned above.
2. Add translations for the xterm, so that the xterm will pass a scroll event
to Vim as an escape sequence.
3. Add mappings in Vim, to interpret the escape sequences as <MouseUp> or
<MouseDown> keys.
3. Add mappings in Vim, to interpret the escape sequences as <ScrollWheelDown>
or <ScrollWheelUp> keys.
You can do the translations by adding this to your ~.Xdefaults file (or other
file where your X resources are kept): >
@@ -303,13 +320,13 @@ file where your X resources are kept): >
<Btn5Up>:
Add these mappings to your vimrc file: >
:map <M-Esc>[62~ <MouseDown>
:map! <M-Esc>[62~ <MouseDown>
:map <M-Esc>[63~ <MouseUp>
:map! <M-Esc>[63~ <MouseUp>
:map <M-Esc>[64~ <S-MouseDown>
:map! <M-Esc>[64~ <S-MouseDown>
:map <M-Esc>[65~ <S-MouseUp>
:map! <M-Esc>[65~ <S-MouseUp>
:map <M-Esc>[62~ <ScrollWheelUp>
:map! <M-Esc>[62~ <ScrollWheelUp>
:map <M-Esc>[63~ <ScrollWheelDown>
:map! <M-Esc>[63~ <ScrollWheelDown>
:map <M-Esc>[64~ <S-ScrollWheelUp>
:map! <M-Esc>[64~ <S-ScrollWheelUp>
:map <M-Esc>[65~ <S-ScrollWheelDown>
:map! <M-Esc>[65~ <S-ScrollWheelDown>
<
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -3056,12 +3056,14 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
<C-Insert> os_dos.txt /*<C-Insert>*
<C-Left> motion.txt /*<C-Left>*
<C-LeftMouse> tagsrch.txt /*<C-LeftMouse>*
<C-MouseDown> scroll.txt /*<C-MouseDown>*
<C-MouseUp> scroll.txt /*<C-MouseUp>*
<C-PageDown> tabpage.txt /*<C-PageDown>*
<C-PageUp> tabpage.txt /*<C-PageUp>*
<C-Right> motion.txt /*<C-Right>*
<C-RightMouse> tagsrch.txt /*<C-RightMouse>*
<C-ScrollWheelDown> scroll.txt /*<C-ScrollWheelDown>*
<C-ScrollWheelLeft> scroll.txt /*<C-ScrollWheelLeft>*
<C-ScrollWheelRight> scroll.txt /*<C-ScrollWheelRight>*
<C-ScrollWheelUp> scroll.txt /*<C-ScrollWheelUp>*
<CR> motion.txt /*<CR>*
<CSI> intro.txt /*<CSI>*
<Char-> map.txt /*<Char->*
@@ -3140,10 +3142,12 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
<S-Insert> os_dos.txt /*<S-Insert>*
<S-Left> motion.txt /*<S-Left>*
<S-LeftMouse> term.txt /*<S-LeftMouse>*
<S-MouseDown> scroll.txt /*<S-MouseDown>*
<S-MouseUp> scroll.txt /*<S-MouseUp>*
<S-Right> motion.txt /*<S-Right>*
<S-RightMouse> term.txt /*<S-RightMouse>*
<S-ScrollWheelDown> scroll.txt /*<S-ScrollWheelDown>*
<S-ScrollWheelLeft> scroll.txt /*<S-ScrollWheelLeft>*
<S-ScrollWheelRight> scroll.txt /*<S-ScrollWheelRight>*
<S-ScrollWheelUp> scroll.txt /*<S-ScrollWheelUp>*
<S-Tab> term.txt /*<S-Tab>*
<S-Up> scroll.txt /*<S-Up>*
<S-xF1> term.txt /*<S-xF1>*
@@ -3152,6 +3156,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
<S-xF4> term.txt /*<S-xF4>*
<SID> map.txt /*<SID>*
<SNR> map.txt /*<SNR>*
<ScrollWheelDown> scroll.txt /*<ScrollWheelDown>*
<ScrollWheelLeft> scroll.txt /*<ScrollWheelLeft>*
<ScrollWheelRight> scroll.txt /*<ScrollWheelRight>*
<ScrollWheelUp> scroll.txt /*<ScrollWheelUp>*
<Space> motion.txt /*<Space>*
<Tab> motion.txt /*<Tab>*
<Undo> undo.txt /*<Undo>*
@@ -6166,18 +6174,22 @@ i_<Home> insert.txt /*i_<Home>*
i_<Insert> insert.txt /*i_<Insert>*
i_<Left> insert.txt /*i_<Left>*
i_<LeftMouse> insert.txt /*i_<LeftMouse>*
i_<MouseDown> insert.txt /*i_<MouseDown>*
i_<MouseUp> insert.txt /*i_<MouseUp>*
i_<NL> insert.txt /*i_<NL>*
i_<PageDown> insert.txt /*i_<PageDown>*
i_<PageUp> insert.txt /*i_<PageUp>*
i_<Right> insert.txt /*i_<Right>*
i_<S-Down> insert.txt /*i_<S-Down>*
i_<S-Left> insert.txt /*i_<S-Left>*
i_<S-MouseDown> insert.txt /*i_<S-MouseDown>*
i_<S-MouseUp> insert.txt /*i_<S-MouseUp>*
i_<S-Right> insert.txt /*i_<S-Right>*
i_<S-ScrollWheelDown> insert.txt /*i_<S-ScrollWheelDown>*
i_<S-ScrollWheelLeft> insert.txt /*i_<S-ScrollWheelLeft>*
i_<S-ScrollWheelRight> insert.txt /*i_<S-ScrollWheelRight>*
i_<S-ScrollWheelUp> insert.txt /*i_<S-ScrollWheelUp>*
i_<S-Up> insert.txt /*i_<S-Up>*
i_<ScrollWheelDown> insert.txt /*i_<ScrollWheelDown>*
i_<ScrollWheelLeft> insert.txt /*i_<ScrollWheelLeft>*
i_<ScrollWheelRight> insert.txt /*i_<ScrollWheelRight>*
i_<ScrollWheelUp> insert.txt /*i_<ScrollWheelUp>*
i_<Tab> insert.txt /*i_<Tab>*
i_<Up> insert.txt /*i_<Up>*
i_BS insert.txt /*i_BS*
@@ -7599,6 +7611,7 @@ synIDattr() eval.txt /*synIDattr()*
synIDtrans() eval.txt /*synIDtrans()*
syncbind scroll.txt /*syncbind*
syncolor syntax.txt /*syncolor*
synconcealed() eval.txt /*synconcealed()*
synload-1 syntax.txt /*synload-1*
synload-2 syntax.txt /*synload-2*
synload-3 syntax.txt /*synload-3*

View File

@@ -30,15 +30,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
concealends does not appear to work.
if_python3.c is missing some changes that were applied to if_python.c.
Find the old version of if_python.c from when the copy was made.
Move more common code from if_python.c and if_python3.c to if_py_both.h
Add documentation for Python 3 support.
Include patch for horizontal scoll wheel? (Bjorn Winckler, 2010 Jul 20)
Additional patch Jul 21.
@@ -50,9 +41,13 @@ Additional patch Jul 21.
Patch for :find completion. (Nazri Ramliy)
But I prefer to keep term.h and include/term.h He will work on it.
Add hg changes to version7.txt
Before release 7.3:
- Rename vim73 branch to default (hints: Xavier de Gaye, 2010 May 23)
Move more common code from if_python.c and if_python3.c to if_py_both.h
Cursor positioning wrong with 0x200e character. (John Becket, 2010 May 6)
Test 69 breaks on MS-Windows, both 32 and 64 builds. (George Reilly, 2010 Feb

View File

@@ -10357,7 +10357,7 @@ Files: src/ex_cmds2.c
Patch 6.2.066 (extra)
Problem: Ruby interface doesn't work with Ruby 1.8.0.
Solution: Change "defout" to "stdout". (Aron Grifis)
Solution: Change "defout" to "stdout". (Aron Griffis)
Change dynamic loading. (Taro Muraoka)
Files: src/if_ruby.c, src/Make_mvc.mak

View File

@@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.3b. Last change: 2010 Jul 24
*version7.txt* For Vim version 7.3b. Last change: 2010 Jul 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5530,7 +5530,7 @@ Files: src/gui_mac.c
Patch 7.1.125
Problem: The TermResponse autocommand event is not always triggered. (Aron
Griffix)
Griffis)
Solution: When unblocking autocommands check if v:termresponse changed and
trigger the event then.
Files: src/buffer.c, src/diff.c, src/ex_getln.c, src/fileio.c,
@@ -8679,7 +8679,7 @@ Files: src/testdir/Makefile
Patch 7.2.218
Problem: Cannot build GTK with hangul_input feature. (Dominique Pelle)
Solution: Adjuste #ifdef. (SungHyun Nam)
Solution: Adjust #ifdef. (SungHyun Nam)
Files: src/gui.c
Patch 7.2.219 (extra)
@@ -9905,7 +9905,7 @@ Files: runtime/doc/autocmd.txt, src/if_cscope.c
Patch 7.2.434 (after 7.2.432)
Problem: Compilation fails without the multi-lang feature.
Solution: Add #ifdefs. (Johm Marriott)
Solution: Add #ifdefs. (John Marriott)
Files: src/menu.c
Patch 7.2.435 (after 7.2.430)
@@ -10032,12 +10032,10 @@ Some versions of Ruby redefine rb_str_new2 to rb_str_new_cstr.
Window title not updated after file dropped.
"g8" doesn't work properly on a NUL.
Fixed crash for ":find" completion, might also happen in other path expansion
usage.
When 'searchhl' causes a hang make CTRL-C disable 'shearchhl'.
When 'searchhl' causes a hang make CTRL-C disable 'searchhl'.
vim:tw=78:ts=8:ft=help:norl: