Re: [vim] Mouse wheel in console-mode Vim



Stefan Weiss <spaceman-6633f-20080522@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi.

I noticed that some applications (for example, w3m) can react to mouse
events in the terminal. The following information is from the Vim help
pages:

| *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
| <MouseUp> or <MouseDown> keys.

I assume that (1) and (2) are already set up correctly, since w3m in
xterm gets the mouse events just fine. Adding the <MouseUp> and
<MouseDown> mappings in Vim did nothing, however:

:map <MouseDown> <C-Y>
:map <S-MouseDown> <C-U>
:map <MouseUp> <C-E>
:map <S-MouseUp> <C-D>

Is there anything else I can try?

What are the values of the 'mouse' and 'ttymouse' options:

:set mouse? ttymouse?

Try

:set mouse=a

and see

:help mouse-using

--
Gary Johnson
.



Relevant Pages

  • Re: Debugging gvim :!cmd with bash
    ... > included an optimization where they would execute the last command ... xterm is the child of bash. ... succesful launch of xterm depends on delayed return to vim. ...
    (comp.unix.shell)
  • [vim] Mouse wheel in console-mode Vim
    ... The following information is from the Vim help pages: ... | To use the mouse wheel in a new xterm you only have to make the ... | scroll wheel work in your Xserver, ... Adding the and mappings in Vim did nothing, ...
    (comp.editors)
  • Re: Backspaces converted to ^? -- want to get rid of ^? -_-...
    ... su'ed in as root using vim, or the SuSe box at work when I VNC into ... behavior so pressing backspace erases a character, ... The attached XTerm file put in $HOME/XTerm will get xterms to send ctrl-h ... Shift: MoveThumbNotifyThumb() \n\ ...
    (freebsd-questions)
  • Re: display background job completion status conspicuously: xterm-color
    ... Any way to get xterm, for example, to keep watching for a certain string ... and then inject color the moment it sees it? ... Any vim gurus who might have a similar vim fix ... Emacs, of course, will do vi bindings. ...
    (comp.os.linux.misc)
  • Xterm and recognition of urls, html, php, etc
    ... I am using mutt with vim as the editor. ... How do I go about setting this up for mutt, vim, xterm, etc? ... Virginia Beach, Virginia 23464 ...
    (Debian-User)