New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse integration not working in vim #2183

Closed
neilbalch opened this Issue Jun 2, 2017 · 16 comments

Comments

Projects
None yet
4 participants
@neilbalch

neilbalch commented Jun 2, 2017

  • 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.

@fpqc

This comment has been minimized.

Show comment
Hide comment
@fpqc

fpqc Jun 2, 2017

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

fpqc commented Jun 2, 2017

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

@benhillis

This comment has been minimized.

Show comment
Hide comment
@benhillis

benhillis Jun 2, 2017

Member

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

Member

benhillis commented Jun 2, 2017

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

@neilbalch

This comment has been minimized.

Show comment
Hide comment
@neilbalch

neilbalch Jun 2, 2017

@benhillis I continue trying to update my computer, but Windows Update will not let me get a new build. I am not registered with the insider program on my computer if that helps. Is there any way to force the update on my computer, bypassing Windows Update?

Thanks for the help

neilbalch commented Jun 2, 2017

@benhillis I continue trying to update my computer, but Windows Update will not let me get a new build. I am not registered with the insider program on my computer if that helps. Is there any way to force the update on my computer, bypassing Windows Update?

Thanks for the help

@fpqc

This comment has been minimized.

Show comment
Hide comment
@fpqc

fpqc Jun 2, 2017

@neilbalch I still don't know why it hasn't been rolled out to everyone yet, but you can force it to update by a number of methods:

https://www.theverge.com/2017/4/5/15199352/microsoft-windows-10-creators-update-manual-install-now

fpqc commented Jun 2, 2017

@neilbalch I still don't know why it hasn't been rolled out to everyone yet, but you can force it to update by a number of methods:

https://www.theverge.com/2017/4/5/15199352/microsoft-windows-10-creators-update-manual-install-now

@neilbalch

This comment has been minimized.

Show comment
Hide comment
@neilbalch

neilbalch Jun 2, 2017

@fpqc Thanks, I found that tool too after a bit of googling... I am trying that now.

neilbalch commented Jun 2, 2017

@fpqc Thanks, I found that tool too after a bit of googling... I am trying that now.

@neilbalch

This comment has been minimized.

Show comment
Hide comment
@neilbalch

neilbalch Jun 2, 2017

@benhillis @fpqc The update to build 15063 did not solve the problem. There is still no mouse functionality.

neilbalch commented Jun 2, 2017

@benhillis @fpqc The update to build 15063 did not solve the problem. There is still no mouse functionality.

@zadjii-msft

This comment has been minimized.

Show comment
Hide comment
@zadjii-msft

zadjii-msft Jun 5, 2017

Member

Curious... @neilbalch have you done anything to modify your any of your .bashrc, .vimrc, or .inputrc files?

Are you running vim inside tmux or screen?

what is the value of your TERM setting? (eg echo $TERM)

Member

zadjii-msft commented Jun 5, 2017

Curious... @neilbalch have you done anything to modify your any of your .bashrc, .vimrc, or .inputrc files?

Are you running vim inside tmux or screen?

what is the value of your TERM setting? (eg echo $TERM)

@neilbalch

This comment has been minimized.

Show comment
Hide comment
@neilbalch

neilbalch Jun 5, 2017

I have modified both .vimrcand .bashrc, but I do not think it is the problem. Is there anything in particular that I should look for there, @zadjii-msft ?

I do not know which I am running vim in, if I am at all. How would I find out?

echo $TERM echoes back xterm-256color

neilbalch commented Jun 5, 2017

I have modified both .vimrcand .bashrc, but I do not think it is the problem. Is there anything in particular that I should look for there, @zadjii-msft ?

I do not know which I am running vim in, if I am at all. How would I find out?

echo $TERM echoes back xterm-256color

@neilbalch

This comment has been minimized.

Show comment
Hide comment
@neilbalch

neilbalch Jun 5, 2017

I do not believe I even have a .inputrc file. When I try to edit it with vim, it says it is a new file.

neilbalch commented Jun 5, 2017

I do not believe I even have a .inputrc file. When I try to edit it with vim, it says it is a new file.

@zadjii-msft

This comment has been minimized.

Show comment
Hide comment
@zadjii-msft

zadjii-msft Jun 5, 2017

Member

@neilbalch can you try opening a file with vi -u none <filename> (it should print "E282: Cannot read from "none" Press ENTER or type command to continue", just hit enter) to load vim without a .vimrc, and try doing :set mouse=aq again?

If you don't know if you're running in screen or tmux, then you almost certainly aren't. Nothing to worry about here then.

And your .inputrc is in something like /etc/.inputrc, but it sounds like you haven't made any changes to that.

Member

zadjii-msft commented Jun 5, 2017

@neilbalch can you try opening a file with vi -u none <filename> (it should print "E282: Cannot read from "none" Press ENTER or type command to continue", just hit enter) to load vim without a .vimrc, and try doing :set mouse=aq again?

If you don't know if you're running in screen or tmux, then you almost certainly aren't. Nothing to worry about here then.

And your .inputrc is in something like /etc/.inputrc, but it sounds like you haven't made any changes to that.

@neilbalch

This comment has been minimized.

Show comment
Hide comment
@neilbalch

neilbalch Jun 5, 2017

@zadjii-msft That gets a lot closer: I can select between windows, but I cannot resize the window boundaries. Does this new info help?

neilbalch commented Jun 5, 2017

@zadjii-msft That gets a lot closer: I can select between windows, but I cannot resize the window boundaries. Does this new info help?

@zadjii-msft

This comment has been minimized.

Show comment
Hide comment
@zadjii-msft

zadjii-msft Jun 5, 2017

Member

@neilbalch actually yea. It looks like moving the window pane borders doesn't work at all in vim. I'll dig into it.

Just to verify, scrolling with the mouse wheel and moving the cursor by clicking the mouse works now for you, correct? It's just the window separators that don't work?

Member

zadjii-msft commented Jun 5, 2017

@neilbalch actually yea. It looks like moving the window pane borders doesn't work at all in vim. I'll dig into it.

Just to verify, scrolling with the mouse wheel and moving the cursor by clicking the mouse works now for you, correct? It's just the window separators that don't work?

@neilbalch

This comment has been minimized.

Show comment
Hide comment
@neilbalch

neilbalch Jun 5, 2017

You are correct. Thanks for looking into this, @zadjii-msft .

neilbalch commented Jun 5, 2017

You are correct. Thanks for looking into this, @zadjii-msft .

@zadjii-msft

This comment has been minimized.

Show comment
Hide comment
@zadjii-msft

zadjii-msft Jul 17, 2017

Member

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.

Member

zadjii-msft commented Jul 17, 2017

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.

@neilbalch

This comment has been minimized.

Show comment
Hide comment
@neilbalch

neilbalch Jul 18, 2017

Encore! Beautiful! That works. Thank you!

neilbalch commented Jul 18, 2017

Encore! Beautiful! That works. Thank you!

@neilbalch neilbalch closed this Jul 18, 2017

@fpqc

This comment has been minimized.

Show comment
Hide comment
@fpqc

fpqc Jul 18, 2017

@zadjii-msft are there any plans to fix those kinds of inherent problems in the console?

fpqc commented Jul 18, 2017

@zadjii-msft are there any plans to fix those kinds of inherent problems in the console?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment