# HG changeset patch # User Guido Berhoerster # Date 1426327041 -3600 # Node ID c293edf9fbac1c9831359056b64010d37e78d541 Initial revision diff -r 000000000000 -r c293edf9fbac README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Sat Mar 14 10:57:21 2015 +0100 @@ -0,0 +1,53 @@ +Vim xsel Script +=============== + +The xsel script for Vim integrates vim with the [xsel utility][1] in order to +copy text from and to X CLIPBOARD selection. + +[1]: http://www.vergenet.net/~conrad/software/xsel/ "xsel" + +Usage +----- + +See the included documentation in Vim help format. + +Contact +------- + +Please send any feedback, translations or bug reports via email to +. + +Bug Reports +----------- + +When sending bug reports, please always mention the exact version of the script +with which the issue occurs as well as the version of vim and the operating +system you are using and make sure that you provide sufficient information to +reproduce the issue and include any input, output, and any error messages. + +License +------- + +Except otherwise noted, all files are Copyright (C) 2009 Guido Berhoerster and +distributed under the following license terms: + +Copyright (C) 2009 Guido Berhoerster + +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. diff -r 000000000000 -r c293edf9fbac doc/tags --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/tags Sat Mar 14 10:57:21 2015 +0100 @@ -0,0 +1,10 @@ +:GetClipboard xsel.txt /*:GetClipboard* +:SetClipboard xsel.txt /*:SetClipboard* +gc xsel.txt /*gc* +sc xsel.txt /*sc* +XselGetClipboard xsel.txt /*XselGetClipboard* +XselSetClipboard xsel.txt /*XselSetClipboard* +xsel xsel.txt /*xsel* +xsel-commands xsel.txt /*xsel-commands* +xsel-mappings xsel.txt /*xsel-mappings* +xsel.txt xsel.txt /*xsel.txt* diff -r 000000000000 -r c293edf9fbac doc/xsel.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/xsel.txt Sat Mar 14 10:57:21 2015 +0100 @@ -0,0 +1,39 @@ +*xsel.txt* xsel script Last change: 2009-02-19 + +xsel integration for Vim *xsel* + +1. Mappings |xsel-mappings| +2. Commands |xsel-commands| + +The xsel script for Vim integrates vim with the xsel utility in order to copy +text from and to X CLIPBOARD selection. It requires xsel to be installed (see +http://www.vergenet.net/~conrad/software/xsel/). + +============================================================================== +1. Mappings *xsel-mappings* + + *sc* *XselSetClipboard* +sc +XselSetClipboard + Set the X CLIPBOARD to the content of the + unnamed register. + + *gc* *XselGetClipboard* +gc +XselGetClipboard + Get the content of the X CLIPBOARD selection + and store it in the unnamed register. + +============================================================================== +2. Commands *xsel-commands* + + *:SetClipboard* +:SetClipboard {reg} Set the X CLIPBOARD to the content of the + register {reg}. + + *:GetClipboard* +:GetClipboard {reg} Get the content of the X CLIPBOARD and store + it in the register {reg}. + +============================================================================== + vim:tw=78:ts=8:ft=help:norl: diff -r 000000000000 -r c293edf9fbac plugin/xsel.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/xsel.vim Sat Mar 14 10:57:21 2015 +0100 @@ -0,0 +1,79 @@ +" Vim xsel integration plugin +" Maintainer: Guido Berhoerster +" Latest Revision: 2009-02-14 +" License: +" Copyright (c) 2009 +" +" 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. +" Requirements: xsel (see http://www.vergenet.net/~conrad/software/xsel/) + +if exists("g:loaded_xsel") + finish +endif +let g:loaded_xsel = 1 + +let s:save_cpo = &cpo +set cpo&vim + +try + if !hasmapto('XselGetClipboard') + map gc XselGetClipboard + endif + noremap