joplin icon indicating copy to clipboard operation
joplin copied to clipboard

Copy keyboard shortcut no longer working in Vim mode

Open AaronOldenburg opened this issue 4 years ago • 27 comments

In Vim mode, selecting text and hitting CTRL+C, or even "+y, doesn't copy anything to the clipboard, either in Normal, Visual or Insert mode. Right-clicking, then selecting "copy" does work. Yanking also works for copying and pasting within Joplin.

Joplin version: 1.1.4 Platform: Linux OS specifics: Manjaro KDE

Steps to reproduce

  1. Set Joplin to Vim mode
  2. Select text with the mouse (or V)
  3. Hit CTRL+C
  4. Try to paste into another program
  5. Does not paste what you think you copied

Describe what you expected to happen

Text is copied and pasted.

AaronOldenburg avatar Oct 05 '20 09:10 AaronOldenburg

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

stale[bot] avatar Nov 05 '20 01:11 stale[bot]

It looks like it's working now, thanks! I tried it in both Normal and Insert mode and it worked fine.

AaronOldenburg avatar Nov 05 '20 13:11 AaronOldenburg

Ah, I might have spoken too soon. I worked in Linux when I pasted with middle mouse button, but doesn't seem to be working in Windows. I still have to right-click, copy. CTRL+C doesn't do anything.

AaronOldenburg avatar Nov 05 '20 15:11 AaronOldenburg

I experience the same issue in Windows desktop app.

pluma9 avatar Nov 28 '20 08:11 pluma9

Same here, Vim mode on Linux, but the problem applies to some other CTRL+X shortcuts (CTRL+A in Normal mode, CTRL+Z in Normal/Insert mode).

sloneorzeszki avatar Dec 18 '20 16:12 sloneorzeszki

Same here. Version 1.5.14 on Linux.

serpro69 avatar Jan 02 '21 18:01 serpro69

I spent some time looking into this tonight and found some references that might be helpful for someone looking to fix this issue.

https://github.com/codemirror/CodeMirror/issues/3075 https://github.com/codemirror/CodeMirror/issues/6341

CalebJohn avatar Jan 06 '21 07:01 CalebJohn

It seems that it works as long as I hit i before hitting Ctrl + c. Still I don't know why it works the way it does.

pluma9 avatar Jan 16 '21 13:01 pluma9

In my case, it does not work even when in insert mode. See #4553 (which I've closed since its a duplicate of this issue).

I will throw in that I don't have this issue with an extension of Jupyter lab, which also uses CodeMirror. Ie. Copy/paste works with either insert or normal mode perfectly fine. It looks like this was previously a problem, but was fixed in https://github.com/jwkvam/jupyterlab-vim/pull/34. That may also provide a template for possible fixing.

jrwrigh avatar Feb 19 '21 15:02 jrwrigh

It doesn't work for me either: Joplin 1.7.11 (prod, linux)

wrzasa avatar Mar 20 '21 20:03 wrzasa

Same issue. Any update? In my case, after changing the copy hotkey to any other one instead of ctrl+c, for example ctrl+shift+c, it works fine in insert mode. But I still want to simply use ctrl+c.

happyTonakai avatar Apr 27 '21 06:04 happyTonakai

On a related note, Ctrl + P also only works in insert mode.

karthikiyengar avatar Apr 27 '21 15:04 karthikiyengar

I recently discovered Joplin and got really excited when I found that it has VIM mode! Yay! But it is a shame that copy to clipboard is broken. This reduces the usefulness of Joplin quite a lot. (Joplin 1.7.11. Win10)

haraldpost avatar May 15 '21 09:05 haraldpost

This is part of the reason why I started to use an external editor. It gives me full control.

pluma9 avatar May 23 '21 11:05 pluma9

Any update on this ? Using a vim mode without copy paste is a bit broken unfortunately !

Thank you for you work

husimo-tilleuls avatar Oct 21 '22 06:10 husimo-tilleuls

Came here after my first 15 minutes of using Joplin. Would really appreciate this feature.

abdullahdevrel avatar Oct 24 '22 12:10 abdullahdevrel

The fact that one can't copy to clipboard using keyboard makes vim mode so broken.

haraldpost avatar Nov 30 '22 19:11 haraldpost

I started using Joplin 2.9.16 on Win 10 a few weeks ago. This issue ist is quite annoying. Any hope for an update on this?

minteral avatar Jan 02 '23 10:01 minteral

As a work around I've found you can do the following.

  1. Enter insert mode
  2. Use your mouse cursor to select the text you would like to copy
  3. Right-click the selected text and choose Copy

This breaks the work flow of vim so this is far less than ideal, but if it's something you don't need to do often, this could work until it's properly fixed.

abaga129 avatar Jan 11 '23 13:01 abaga129

found a solution for windows:

  1. In visual mode --> Highlight the part of the note in Joplin that you want to copy to the clipboard.
  2. Make sure that the cursor is blinking on the left of the highlighted part; usually, it is Shift + O to switch position.
  3. Shift + F10 to imitate a mouse click, then use the arrow down to copy.

MK-314 avatar Aug 02 '23 23:08 MK-314

Vim mode support for CM6 has moved to codemirror-vim and the + register has been implemented there. Consequently, this issue could be dealt with along the way when we migrate from 5 to 6. That said, it is unclear if there is a strong enough incentive to bring codemirror in @joplin/app-desktop up to date.

xty avatar Sep 13 '23 20:09 xty

Vim mode support for CM6 has moved to codemirror-vim and the + register has been implemented there. Consequently, this issue could be dealt with along the way when we migrate from 5 to 6. That said, it is unclear if there is a strong enough incentive to bring codemirror in @joplin/app-desktop up to date.

See https://github.com/laurent22/joplin/pull/8793 (the main issue with upgrading to CodeMirror 6 is that it breaks a large number of plugins).

Vim mode support for CM6 has moved to codemirror-vim and the + register has been implemented there. Consequently, this issue could be dealt with along the way when we migrate from 5 to 6. That said, it is unclear if there is a strong enough incentive to bring codemirror in @joplin/app-desktop up to date.

See #8793 (the main issue with upgrading to CodeMirror 6 is that it breaks a large number of plugins).

Looks like the migration to CodeMirror 6 is done (looking at the above PR). However, it doesn't look like the + register is working, at least in normal mode for me. Can anyone confirm that it is working for them?

I'm on Joplin 2.13.13 via appimage from AUR.

jrwrigh avatar Jan 07 '24 17:01 jrwrigh

The + register is working for me (e.g. with "+yy and "+p).

The CodeMirror 6-based editor is still in beta though and needs to be enabled in settings.

Gotcha. Enabling the beta editor (Tools>Options ... General->Opt-in to the editor beta) did the trick.

jrwrigh avatar Jan 07 '24 17:01 jrwrigh

That fixed it for me too!

Gotcha. Enabling the beta editor (Tools>Options ... General->Opt-in to the editor beta) did the trick.

bradbaas2 avatar Jan 24 '24 22:01 bradbaas2

Gotcha. Enabling the beta editor (Tools>Options ... General->Opt-in to the editor beta) did the trick.

Thanks! It is working. Select text with the mouse (or V), Hit CTRL+C, actually copies text to clipboard now :)

haraldpost avatar Apr 28 '24 10:04 haraldpost