neovim icon indicating copy to clipboard operation
neovim copied to clipboard

Mouse position and warping support

Open myitcv opened this issue 9 years ago • 0 comments

In acme (on Plan9), the mouse can be warped to a new position on certain events, e.g. a new window is opened. When a new window is opened the mouse is positioned in the middle of that window's layout box allowing you to quickly move the new window to a new location.

We could easily write a plugin that provides this support within the X window system using XWarpPointer, for both terminal and GUI Neovim.

This plugin would essentially be responsible for providing a two-way mapping between window pixel coordinates and terminal coordinates. i.e. if a new window is created, Neovim will know in terms of terminal coordinates where that window is. This plugin could then translate that to pixel coordinates and jump the mouse there.

This will also be useful for providing acme-esque support for the three mouse buttons. e.g. right clicking on a build error in the win equivalent output of a go build run, will not only open that file but it will jump to the line in question and position the mouse there.

It would also allow terminal vim to support focus-follows mouse within windows.

This might also allow us to support drag and drop positioning of windows (again, per acme)

myitcv avatar Sep 27 '14 10:09 myitcv