0

Problem is present when there is the following option for mouse in ~./vimrc:

set mouse=a | " active

2 Answers 2

1

You can't copy because set mouse=a gives Vim full control of the mouse.

Since this is vi.stackexchange.com, a proper Vim solution would simply be to:

  1. disable mouse handling with :set mouse=,
  2. select whatever you want with the mouse and copy it,
  3. re-enable mouse handling with :set mouse=a.
2
  • Why not to just use Shift + mouse selection? Apr 2 at 20:23
  • 1
    Because Shift + mouse selection is system/terminal-specific.
    – romainl
    Apr 3 at 4:34
0

Hold Shift, then copy like in terminal (select text with mouse, press Ctrl + Shit + C)

Related question:

3
  • 1
    this works only in a terminal Apr 3 at 6:25
  • 1
    @ChristianBrabandt In the GUI you can hold Ctrl+Shift while selecting text with the mouse. If 'guioptions' contains a the selection is automatically put into the selection register "* on X11 systems; on Windows the clipboard is used. (See :help modeless-selection.) Apr 3 at 7:17
  • Oh, this works always in all GUIs? I have learned something :) Thanks @JürgenKrämer Apr 3 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.