In my .vimrc
I have this piece of code:
" Gist it to bl.ocks.org {{{
let g:gist_clip_command = 'xclip -selection clipboard'
command! -range=% Blocks
\ <line1>,<line2>Format format | f index.html | exe 'Gist! -p' | bd! |
\ let @+ = 'http://bl.ocks.org/oblitum/raw/' . matchstr(@+, 'https://gist.github.com/\zs\w\+\ze') . '/' |
\ let @+ = bitly#shorten(@+).url | redraw | echomsg 'Done: ' . @+ | setlocal nomodified
" }}}
At the top of the .vimrc
I set clipboard=unnamedplus
and add all the necessary plugins (frawor, formatvim, webapi-vim, gist-vim, bitly.vim). This command is to get buffer contents including highlighting and post it to a web page online.
This command works when executed from Vim in the terminal, but it doesn't when executed from GVIM.
On GVIM it seems that Gist! -p
works for saving the gist url into the clipboard but then all the remaining command parts that are supposed to edit and transform this content in the clipboard seems to be doing nothing and in the end the echomsg
just displays what was created by the original Gist! -p
.