Issue with vim mousemodel - vim

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.

Related

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

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

Editor window loses focus on shortcut view change

In Android studio, while having a .xml file (layout) open in editor window, there are two modes available: Design and Text. In Mac the short-cut for going back and forth in these views are said to be Control + Shift and Left/Right. However once you press one of these combination the editor window will lose the focus and in order to go back, you have to click on the editor window.
How can one resolve that without the extra click?

How can I set the default orientation of labview windows?

Whenever I open a new labview project, it opens two small windows, one for the block diagram and the front panel. Since using labview effectively requires simultaneous use of both, is it possible to set things up such that, upon starting a new VI, it opens these two windows in pre-determined positions and sizes?
I do not know setting to do so (and think there is no such setting), but your problem is easily solvable if you press ctrl+t when new vi is opened.
ctrl+t will set front panel on the left half part of the screen and block diagram on the right part. Pressing ctrl+t a second time will set the panel to top half and diagram to the bottom half.
Shortcuts In LabVIEW
Another workaround:
Create a new empty VI
Resize and reposition the front panel window as you wish
Do the same for the block diagram window
Save the VI as a template (.vit)
Double click the template to use it (position and size of windows will be as they were when saving)
Alternatively if you want to be doing manually everytime. You can press WIN+LEFT on one of the windows and WIN+RIGHT on the other. This will evenly distribute the two windows over the screen.
You can set window position for individual VIs by pressing Ctrl+I to open the VI properties, and setting the desired appearance under "Window Size"

Sublime text 3 find and replace in selection without clicking the button

I'm using ST3 with vintage mode. When selecting some lines and pressing alt+shift+f (Mac OSX) I get the find and replace dialog at the bottom of the screen.
BUT, I have to remove my hand from the keyboard, reach for the mouse and click the little "In selection" button...
...is there some way for sublime to realize that I have made a selection and have that button clicked by default?
Try setting:
"auto_find_in_selection": true,
From my understanding, this will automatically use 'in selection' if you have non-empty selection when goes into find box.
[Edit]
Note, you generally set this settings in "Preferences.sublime-settings". You can open this setting by "Ctrl+Shift+P", and select "Preferences: Settings - User".

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