diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-02-27 03:10:55 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-03-01 14:47:49 +0100 |
commit | 937e54f86599ab448e6497955e2b4dddf6347e88 (patch) | |
tree | e3ba431fb1480d4dde8362604139a36fb0d576bb /runtime | |
parent | 504693ce66e61e2976b0af2930177a07bafbe6f3 (diff) | |
download | rneovim-937e54f86599ab448e6497955e2b4dddf6347e88.tar.gz rneovim-937e54f86599ab448e6497955e2b4dddf6347e88.tar.bz2 rneovim-937e54f86599ab448e6497955e2b4dddf6347e88.zip |
terminal: Keep cursor position.
Let the terminal dictate the normal-mode cursor position. This will be
disorienting sometimes, but it is closer to what users expect vs always
going to the last line.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/deprecated.txt | 6 | ||||
-rw-r--r-- | runtime/doc/scroll.txt | 51 |
2 files changed, 7 insertions, 50 deletions
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 6997d331e4..ef00143709 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -16,14 +16,12 @@ Normal commands ~ *]f* *[f* Same as "gf". - Commands ~ *:rv* *:rviminfo* Deprecated alias to |:rshada| command. *:wv* *:wviminfo* Deprecated alias to |:wshada| command. - Events ~ *EncodingChanged* Never fired; 'encoding' is always "utf-8". *FileEncoding* Never fired; equivalent to |EncodingChanged|. @@ -31,6 +29,10 @@ Events ~ Highlight groups ~ *hl-VisualNOS* Obsolete. |vim-differences| {Nvim} +Keycodes ~ +*<MouseDown>* Use <ScrollWheelUp> instead. +*<MouseUp>* Use <ScrollWheelDown> instead. + Functions ~ *buffer_exists()* Obsolete name for |bufexists()|. *buffer_name()* Obsolete name for |bufname()|. diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt index f2a6f713e6..a9492fc169 100644 --- a/runtime/doc/scroll.txt +++ b/runtime/doc/scroll.txt @@ -235,15 +235,9 @@ This allows quick adjustment of the relative offset of 'scrollbind' windows. ============================================================================== 6. Scrolling with a mouse wheel *scroll-mouse-wheel* -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|. 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 -depends on your mouse driver. If the scroll action causes input focus -problems, see |intellimouse-wheel-problems|. +When your mouse has a scroll wheel, it should work with Nvim in the GUI and +any terminal that has mouse support. By default only vertical scroll wheels +are supported, but some GUIs also support horizontal scroll wheels. 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 @@ -258,43 +252,4 @@ the scroll wheel move one line or half a page in Normal mode: > :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 -check if this works with the "xev" program. - - *<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. - -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 <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): > - - XTerm*VT100.Translations: #override \n\ - s<Btn4Down>: string("0x9b") string("[64~") \n\ - s<Btn5Down>: string("0x9b") string("[65~") \n\ - <Btn4Down>: string("0x9b") string("[62~") \n\ - <Btn5Down>: string("0x9b") string("[63~") \n\ - <Btn4Up>: \n\ - <Btn5Up>: - -Add these mappings to your vimrc file: > - :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: |