upl.io is a file-upload/snippet-sharing webapp by Ole Bergmann.
uplio.vim allows you to...
- Upload snippets selected in Visual-mode.
- Upload current file and unnamed buffers.
- Insert to clipboard via
xclip
(UNIX/Linux),pbcopy
(OS X),clip
(Windows) or a configurable clipboard binary. Note thatxclip
also works over X11 forwarding.
uplio.vim automatically...
- Chooses a clipboard binary to paste into based on operating-system.
- Creates a temporary file when needed for Visual-mode snippets.
- Appends a filetype extension to get proper syntax highlighting.
- Adds filename "unnamed_"+strftime to unnamed buffers (Example: unnamed_27.06.16_16.57.05).
- curl
- Clipboard commandline-interface (xclip, pbcopy, etc.)
-
Plug 'dezza/uplio.vim' vmap UU <Plug>Uplio_Visual("v") nmap UU <Plug>Uplio_File("n")
With vim-plug fancy autoloading:
Plug 'dezza/uplio.vim', { 'on': ['<Plug>Uplio_File', '<Plug>Uplio_Visual'] } vmap UU <Plug>Uplio_Visual("v") nmap UU <Plug>Uplio_File("n")
uplio.vim already does autoloading but vim-plug autoloads /plugin/uplio.vim as well.
-
To have previous entries displayed when logged into upl.io with your username:
let g:uplio_key = '__KEY__'
-
vmap UU <Plug>Uplio_Visual("v") nmap UU <Plug>Uplio_File("n")
-
man 3 strftime
http://vimhelp.appspot.com/eval.txt.html#strftime%28%29
http://vim.wikia.com/wiki/Insert_current_date_or_time
let g:uplio_strftime = substitute(strftime('%x_%X'), '/\|:', 'x', 'g')
Localized date/time
%x_%X
where/
and:
is substitued by_
" Europe-timeformat let g:uplio_strftime = "%d_%m_%y_%H_%M_%S"
" US-timeformat let g:uplio_strftime = "%m_%d_%y_%H_%M_%S_%p"
-
let g:uplio_echo_url = 0
-
let g:uplio_loaded = 0