Make copy to system-clipboard the default for vim mode (yank)

Things I have tried

Installing the vimrc community plugin and adding a .obsidian.vimrc file at the root of the vault with the contents “set clipboard=unnamed” is a workaround. But it isn’t wonderful, whereas most of Obsidian is beautiful and generally easy to use.

What I’m trying to do

I’d like to use vim mode without having to install a community plugin to make copy/paste work.

It has been documented before that copy/paste is kind of broken when toggling vim mode on. The only way to “export” highlighted text to another app is to right-click with mouse & use the pop-up menu.

I’d suggest an option to make copy-to-clipboard something that can be toggled, but if that is not possible or doesn’t fit the design goals, I think a default-working copy-to-system-clipboard would be a generous alternative.

8 Likes

Yeah, this is my biggest current issue with Obsidian. I never have figured out how to make the vimrc plugin work either.

For those with a similar issue:

Only workaround that seems to work on my Win11 machine is manually typing :unmap <C-c> upon starting Obsidian. The same line doesn’t seem to do anything from inside the .obsidian.vimrc file the VimRC plugin provides. It’s not the worst workaround because it persists until a restart, which is infrequent for me, but it’s still less than ideal.

1 Like

I’m using the Vimrc support plugin to make copy work. As mentioned here There is no system clipboard in VIM mode - #4 by WhiteNoise

2 Likes

I just found out, that using dd copies the deleted line into the system clipboard, but yanking doesnt work. Seems kinda weird

Thanks a lot for this. Unfortunately, it’s still the issue.

Apologize for reviving such a stale thread, but has there been any movement on this the past 3 years? Seems strange that it is still so bad to use this specific feature

Use case or problem

While in vim mode, I expect using the built in yank function to copy my selection to my system clipboard.

Proposed solution

Enable a feature flag to allow users to yank items into their system clipboard clipboard.
${text} | wl-copy for linux, not sure the rest :\

Current workaround (optional)

The only work around now is to use ctrl+c, which isn’t terrible, my issues is primarily when using multiple programs with vim key-binds where there all act a bit different. So this would be a nice to have! (^-^)/

Related feature requests (optional)

  • 107176 - Bug Graveyard

Me if I get this feature

ʕっ•ᴥ•ʔっ

Me if I don’t

ʕノ•ᴥ•ʔノ ︵ ┻━┻

with love <3

  • Connor R.