WSL: Mouse integration not working in vim

  • Your Windows build number: (Type ver at a Windows Command Prompt)

[Version 10.0.14393]

  • What you’re doing and what’s happening: (Copy&paste specific commands and their output, or include screen shots)
 vim <any file path>
 :set mouse=ar
  • What’s wrong / what should be happening instead:

There is still no mouse functionality in vim, i.e. I cannot drag the split bars and move the cursor around by clicking somewhere

  • Strace of the failing command, if applicable: (If <cmd> is failing, then run strace -o strace.txt -ff <cmd>, and post the strace.txt output here)

Not Applicable

I am not aware of any intermediary step I am missing to get the mouse functionality working. The same steps work for me on my Debian Jessie VM.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 17 (5 by maintainers)

Most upvoted comments

I figured out a workaround for this issue. This has to do with the way that terminals convey mouse events to the application. And unfortunately, because of some shortcomings inherent to the console, the default mouse mode won’t work in all cases it would in *nix proper.

Fortunately, there is a workaround to getting full mouse support to work in vim. Taken from https://superuser.com/a/1017587, add the following to your .vimrc

set ttymouse=sgr

That will change the way vim communicates with the terminal, and should make vim work in all situations.

Some mouse support was added in Creator’s Update, could you please upgrade your build and try?

14393 is super outdated, could you please update Windows to version 1703 (15063)