|Corey Prophitt 16f9ea67d8 Fixed quoting issue||4 years ago|
|autoload||4 years ago|
|plugin||5 years ago|
|.gitignore||5 years ago|
|README.md||4 years ago|
Upload text to paste services with Vim.
First and foremost you need to have Ruby support built in your Vim install. If you're an OSX user and installed via Homebrew you most likely have the support. If you're a Linux user you can install a larger Vim package with more support if you need it. You can see which options are enabled for vim with,
$ vim --version
If you see
+ruby then everything is fine.
This plugin requires the
pasteit gem to be installed. This also assumes you
have a correct Ruby installation and rubygems. The pasteit gem is available via
Rubygems, you can see it here.
You can install the pasteit gem with,
$ gem install pasteit
With that out of the way all you need to do is install this plugin itself. This plugin uses the pathogen project structure. If you don't have pathogen installed you should grab it here.
Once you have pathogen installed
git clone vim-pastie and either symlink or
copy the vim-pastie directory to your
This plugin has two primary functions that you need to bind in your
file. Below is a description of each function and an example binding,
This function will take all text from the current buffer and upload it to a paste service.
nnoremap <leader>u :PasteitAll<cr>
This function takes a visually selected block and uploads the block to a paste service.
vnoremap <leader>u :PasteitSelected<cr>
With those two bindings you are all set. There is one optional setting you may be interested in,
By default this is enabled. This means when you call one of the two functions above the URL for the paste will automatically be copied to your system's clipboard. If you don't want this behavior you can disable it,
let g:pasteit_copy_to_system_clipboard = 0
Copyright (c) 2015, Corey Prophitt.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.