In nvim, how can I I make it so the mouse will select a split, but not select any text. I only want the mouse to control window focus - vim

I want to be able to toggle on and off this potential feature too. Sometimes, I don't want to change the cursor position, but I want to use my mouse to select a split to focus on.
I tried disabling mouse and fiddling with in by typing :h mouse in nvim, but nothing I could find in the docks helped

Related

PYQT5 Open menu on cursor position in QTextEditor

I have a QTextEditor which I would like to open a menu for user to choose when he press Ctrl+Space.
I was able to capture the key events and create the menu and trigger it.
My problem is to open the menu on the text cursor position.
How do i get the QPoint of the textcursor and not the mouse position?
QTextEdit.cursorRect returns a rectangle (in viewport coordinates) that includes the cursor.
You're probably imlementing autocompletion/intellisense, it which case I'd recommend using QCompleter instead of QMenu. Take a look at Custom Completer Example.
You can override QTextEdit.keyPressEvent or use eventFilter to capture Ctrl+Space shortcuts and call completer.complete(rect) to show popup.

How to switch between tabline and buffers view in vim airline?

I've been using vim-airline on vim-8.0 and it displays tabs in the tabline and when I mouse left-click (with mouse input enabled) on filename on the far right hand side of the tabline the view switches to buffers (if I have enabled the option: let g:airline#extensions#tabline#show_buffers = 1).
But so far I can't seem to find a way to get back to tab view again? This may just be a standard vim tab navigation issue as even with show_buffers disabled when I click on the right hand side of the tabline I get stuck with viewing just that file.
A solution using the mouse would be preferable but a vim command would be fine too.

Android studio documentation popup

Is there a way when documentation popup on AS to not hide immediately after it is showed by moving mouse on some class. What I mean. I move mouse cursor above Activity class and documentation is popup is showed, but when I try to move mouse above this popup (because I have to scroll it) it disappears. I can hold ctrl and then is will not hide, but if I press on it while holdint ctrl down it will disappear (so I should move cursor above it, release ctrl and after that to start scrolling). So is there an option to change this behaviour to be like in eclipse - documentation pop up is showed and if you move mouse above it you can scroll, otherwise it is closed.
There are a lot of bugs surrounding this UI element. I'm currently having the opposite problem where it won't go away unless I manually close it. I suspect in your case, a timeout is triggering too early, or some other event is erroneously hiding the window.
This workaround may be helpful. You can explicitly pop the documentation window from the View > Tool Windows > Documentation menu option. This will cause the tool window tab to appear on the right gutter by default. Right-clicking on the Documentation tab will pop up a menu that will allow you to pin the window, or dock it permanently in the UI by disabling "Floating Mode" and optionally moving it to the other side or the bottom.

Issue with vim mousemodel

Recently I came across a feature of gvim. When I press shift and click on a word the words get highlighted similar to Notepad++ (I am aware of * or #).
But if I put in my .vimrc
set mousemodel=popup
This behavior strangely stops. Anybody encountered this?
using
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 29 2013 13:30:15)
This is actually by design according to :h mousemodel:
*'mousemodel'* *'mousem'*
'mousemodel' 'mousem' string (default "extend", "popup" for MS-DOS and Win32)
global
{not in Vi}
Sets the model to use for the mouse. The name mostly specifies what
the right mouse button is used for:
extend Right mouse button extends a selection. This works
like in an xterm.
popup Right mouse button pops up a menu. The shifted left
mouse button extends a selection. This works like
with Microsoft Windows.
(...)
Overview of what button does what for each model:
mouse extend popup(_setpos) ~
left click place cursor place cursor
left drag start selection start selection
shift-left search word extend selection
right click extend selection popup menu (place cursor)
right drag extend selection -
middle click paste paste
Basically, popup simulates mouse behavior in a typical Windows application, and Windows applications don't highlight words by shift-clicking.
On a normal Windows application, highlighting a single word is done by double-clicking. I am not entirely sure if the popup model is responsible for that action as well, or if it happens elsewhere, but it should be easy enough for you to test.

Allow clicking in vim in cygwin

I am using vim, which I believe has a click function (you click, it changes the mode from edit, command, etc), however in Cygwin, you can't do that. Then again, I'm not sure if it's clicking is the thing in vim, let alone Cygwin.
I am using mintty, on Cygwin.
Clicking doesn't really change modes but, supposing your terminal emulator supports mouse reporting, you can activate mouse support in Vim with this command:
:set mouse=a
To activate mouse support permanently, add this line to your ~/.vimrc:
set mouse=a
See :help 'mouse'.
To get mouse positioning working with mintty (It's the default terminal emulator used when you start Cygwin now) on Cygwin you may need to alter the settings so that you get the expected behavior - Right click on the top left of the window to bring up the Options... menu then go to the Mouse settings. If you want it position the mouse with a left mouse click you need to select under 'Application' under the 'Default click target' which is in the 'Application mouse mode' box. If you have 'Window' selected then you'll need to hold down the selected Modifier key (as set immediately below this setting) - Usually the Shift key - and left click to position the mouse.
This worked for me:
Alt + Space -> Options -> Mouse -> Clicks place command line cursor
Options section:

Resources