-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
:Gist should copy posted URL to "+, not "" #187
Comments
do you mean following?
|
Yanking to In if exists('g:gist_clip_command')
exec 'silent w !'.g:gist_clip_command
elseif has('clipboard')
silent! %yank +
else
%yank
endif I think that's the right logic there. You should just update if exists('g:gist_clip_command')
call system(g:gist_clip_command, url)
elseif has('clipboard')
let @+ = url
else
let @" = url
endif |
Ah, do you mean that gist.vim should copy URL instead of contents? |
If you can, could you please send me a pull-request? |
PR submitted as #189. |
When I run
:Gist
, it seems to yank the pasted URL into""
. For reference, I have not definedg:gist_clip_command
. From reading the code, it appears to yank into""
ifhas('unix') && !has('xterm_clipboard')
. This is a bad condition. I'm running MacVim, which maps"+
(and"*
) to the system clipboard, similar to xterm, but MacVim does not define the+xterm_clipboard
feature (possibly because it does not automatically copy selections to"*
, because OS X does not have a selection clipboard).I'd recommend changing this to just being
has('clipboard')
, which is the condition you use ins:GistGet
to determine if you should yank to"+
. This should be sufficient to determine if there is a"+
register, and if there is, then you should be yanking to it.The text was updated successfully, but these errors were encountered: