Home Download Buy Blog Forum Support

Yanking from vintage mode to system

Yanking from vintage mode to system

Postby edanm on Thu Oct 06, 2011 7:31 am

Hi,

When yanking (e.g. yy) in vintage mode, the contents are copied to an internal buffer that Sublime has, so only Sublime knows about them. This text can't later be copied to other windows.
Is there any way to make yanking in vintage mode copy to the system buffer all the time instead?

vim supports this, and I have it turned on in vim.
edanm
 
Posts: 131
Joined: Thu Mar 04, 2010 11:05 pm

Re: Yanking from vintage mode to system

Postby edanm on Mon Mar 05, 2012 3:29 pm

Does anyone have any idea how to do this?

Perhaps implement a keybinding that takes "y" and copies to system clipboard instead of to vintage's internal clipboard?
edanm
 
Posts: 131
Joined: Thu Mar 04, 2010 11:05 pm

Re: Yanking from vintage mode to system

Postby guillermooo on Mon Mar 05, 2012 3:50 pm

Code: Select all
"*y


That should do it.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Yanking from vintage mode to system

Postby edanm on Fri Mar 09, 2012 1:15 am

Yeah, but I'd really rather not do that every time. I *always* want to yank to the system clipboard.

In Vim, the line to do this is:
set clipboard=unnamed
edanm
 
Posts: 131
Joined: Thu Mar 04, 2010 11:05 pm

Re: Yanking from vintage mode to system

Postby edanm on Sun Apr 01, 2012 3:42 pm

Hey,

So it looks like the Nightly build has the new option called "vintage_use_clipboard" by guillermooo.

As far as I can tell, this solves one direction - yanking things from Sublime will go to the system clipboard. Which is awesome!

However it looks like the other direction isn't working, i.e., when trying to paste using "p" in Sublime, even with "vintage_use_clipboard" on, pasting is still done from the internal Sublime yankring. This is inconsistent with vim's handling of this.

Btw, I'm unclear whether it's "vintage_use_clipboard" or "vintage_clipboard = unnamed".
edanm
 
Posts: 131
Joined: Thu Mar 04, 2010 11:05 pm

Re: Yanking from vintage mode to system

Postby guillermooo on Sun Apr 01, 2012 5:39 pm

Ooops! I've forgotten about that. Should be easy to fix, though.

The final name is "vintage_use_clipboard", which takes a bool. Replicating all of the options of the clipboard setting in Vim didn't seem necessary.

BTW, it'd be great if you could report issues to the GitHub repo (sublimehq/Vintage). I have the feeling other people contributing to Vintage don't check the forums as often.

Cheers,
G
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Yanking from vintage mode to system

Postby edanm on Mon Apr 02, 2012 8:30 am

I'm actually unclear where I should be reporting bugs to. 'Cause I actually have a huge list of issues in vintage. I even considered jumping in and making some changes myself.

I've just never really used github before. Maybe I'll give it a go soon.
edanm
 
Posts: 131
Joined: Thu Mar 04, 2010 11:05 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 20 guests