-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should Vi mode really use its own internal clipboard? #319
Comments
Hi Dan, I thought about implementing it that way but decided against it because:
I like it the way it is, but I'd support putting your idea behind a setting. |
@jazzdelightsme, @srdubya Interesting! I was just going to request that this be configurable. 😄 I too would like access to the system clipboard because I'm constantly doing the copy/paste thing from other sources into the PowerShell prompt. I always use the unnamed register in gVim/VsVim. With that said, I really like the the existing visual copy capability from @lzybkr. That's why I originally asked that |
Agreed, a configuration option is a good idea. I use that setting in Vim and find it extremely useful, but it's not for everybody. As for registers - I could see adding them. Emacs mode has the kill ring which is similar to having multiple registers. |
Thank you everyone for the discussion! @srdubya : I personally don't care much what git bash does :), but item 2 alone is a good enough reason on its own to tread carefully, like putting it behind an option. When I get a chance I'll think about how registers might be implemented, unless somebody beats me to it. |
So if I want to vi mode use system clipboard instead of its own, what should I do for it? |
@Wongboo Make vi-mode use the system clipboard is not currently supported, unfortunately. Not sure this would be worth it to be honest. One way would be to have an option, which would replace the internal clipboard and use the system clipboard. A better way would be to support the Again, I’m not really sure there is a use case for it, though 🤔. |
I agree that would be the better way to go, if we really decide to support it. |
@srdubya : Thank you for implementing Vi mode!
I got tripped up trying to use "p" to paste some text from the system clipboard. I took a look at the code, and saw that Vi mode uses its own internal clipboard (just a string member called _clipboard).
I don't anticipate ever getting register support in PSReadLine (I don't think we want an entire vi implementation inside PSReadLine), so I think it would make sense to make the system clipboard the backing store for Vi mode's yank/put operations.
What do you all think?
The text was updated successfully, but these errors were encountered: