paster.vim : paster.vim - A configurable Vim plugin for posting text to a public pastebin
| script karma
Downloaded by 1149
Comments, bugs, improvements
script versions (upload new version)
|Paste text from the current document onto a public pastebin or board. This
implementation is written in vim to reduce external dependencies to Python or
Perl. The only external dependency is cURL (e.g. /usr/bin/curl in UNIX-like
systems) as an HTTP posting tool. This posting tool, and all its command line
parameters are configurable by the user.
* Pastes to any pastebin with a public API
* The end-user's nick is configurable per use, or via .vimrc
* Sends syntax highlighting information if the target supports it
* Uses standard vim range commands for its use
* Copies the URL where the text was pasted to the system clipboard and the
* Opens a web browser at the page where the paste was posted (v1.2)
Install paster.vim to the appropriate default vim scripts directory for your
configuration, normally $HOME/.vim/plugin
Once installed, the Paste[bin] command may be invoked in any of these patterns:
- :.Paste -- paste the current line
- :%Paste -- paste the entire document
- :42,69Paste -- paste lines 42 through 69, inclusive
The Paste command will work with selections made in visual mode as well.
Paste will prompt for a value if the user hasn't defined a /nick or ID prior
to the command's first invocation.
Upon successful completion, Paste will display the URL to the paste. Paste will also copy it to the window manager's clipboard under
MacVim and gvim.
Project page: http://github.com/pr3d4t0r/paster
Unpack the .zip file and copy the files to your
gvim or vim configuration directory, then:
Click on the package to download.
ip used for rating: 18.104.22.168
||Option to open a web browser after the paste is posted to the pastebin site. See the paster-config.vim file for details. Set the g:PASTER_BROWSER_COMMAND variable in .vimrc with the command for opening the browser.
Michael Jansen provided a pastey bug fix and ideas for creating the browser interface.
||Will Gray provided the configuration for using pastey.net with paster.vim
Separated the configuration portion from the main script in paster-config.vim
There are no operational changes. The installation and usage instructions are unchanged.