Created
April 28, 2011 04:08
-
-
Save trapd00r/945783 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" xclipboard.vim | |
" Author: Magnus Woldrich <[email protected]> | |
" Version: 0.01 | |
if(exists("g:loaded_xclipboard")) | |
finish | |
endif | |
let g:loaded_xclipboard = 1 | |
let g:xclipboard_pipe_path = expand('~/.vim/xclipboard') | |
if filewritable( xclipboard_pipe_path ) != 1 | |
echo xclipboard_pipe_path . ' is not writeable' | |
echo 'set g:xclipboard_pipe_path or mkfifo ' . xclipboard_pipe_path | |
finish | |
endif | |
" Write buffer to fifo | |
nnoremap <leader>W :exec ':w>> ' . eval(string( xclipboard_pipe_path ))<CR> | |
" Write the current line to fifo | |
nnoremap <leader>w :exec ':.w>> ' . eval(string( xclipboard_pipe_path ))<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment