Paste your current vim bufffer content to http://paste.ubuntu.com/, support many filetypes, support vim compiled with python or python3. Just in your vim and execute :Pastebin
, then vim will print pasted url, you can open it in your browser(automaticlly when use desktop). Note this plugin shares your file public, if your file is private you may use gist.github or scp command.
-
Post current buffer to http://paste.ubuntu.com/
:Pastebin
Required vim compiled with +python or +python3.
- pip install requests # pip3 install requests
Use your plugin manager of choice.
- Pathogen
git clone https://github.com/PegasusWang/vim-ubuntu-pastebin ~/.vim/bundle/vim-ubuntu-pastebin
- Vundle
- Add
Bundle 'https://github.com/PegasusWang/vim-ubuntu-pastebin'
to .vimrc - Run
:BundleInstall
- Add
- NeoBundle
- Add
NeoBundle 'https://github.com/PegasusWang/vim-ubuntu-pastebin'
to .vimrc - Run
:NeoBundleInstall
- Add
- vim-plug
- Add
Plug 'https://github.com/PegasusWang/vim-ubuntu-pastebin'
to .vimrc - Run
:PlugInstall
- Add
- PegasusWang
If you want to learn write vim plugin use python, see this youtube radio Writing Vim plugins with Python vim-plugin-starter-kit
如果你和我一样记性不好老是记不住scp命令怎么使的,可以试试直接安装这个插件之后在vim里执行 :Pastebin
,代码会自动贴到http://paste.ubuntu.com然后自动打开浏览器。
如果你对怎么用python写vim插件有兴趣可以参考以上油管视频链接或者我的博客。