paster.vim : paster.vim - A configurable Vim plugin for posting text to a public pastebin



script karma Rating 80/26, Downloaded by 1489 Comments, bugs, improvements Vim wiki created by Eugene Ciurana script type utility description 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.



Features:



* 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

status line

* Opens a web browser at the page where the paste was posted (v1.2)



Usage



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

install details UNIX-like systems:



cd ~/.vim



unzip /path/to/paster.zip



vi

:helptags ~/.vim/doc





Windows systems:



Unpack the .zip file and copy the files to your

gvim or vim configuration directory, then:



vi

:helptags C:/path/to/doc

rate this script Life Changing Helpful Unfulfilling script versions (upload new version) Click on the package to download. package script version date Vim version user release notes paster_vim-1_2.zip 1.2 2009-10-11 7.0 Eugene Ciurana 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. paster.zip 1.1 2009-04-25 7.0 Eugene Ciurana 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. ip used for rating: 176.9.113.70