4

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.

timss
  • 9,982
  • 4
  • 34
  • 56

3 Answers3

5

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

romainl
  • 186,200
  • 21
  • 280
  • 313
2

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.

Pierz
  • 7,064
  • 52
  • 59
0

This worked for me:

Alt + Space -> Options -> Mouse -> Clicks place command line cursor

Options section:

enter image description here

drapkin11
  • 1,205
  • 2
  • 12
  • 24
Ender
  • 1
  • 1