Permalink
Browse files

Fixes

  • Loading branch information...
1 parent 57c5828 commit a4467a142acb75ed4e13f82f2975adf48f933b89 @graudeejs committed Jul 7, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 vimrc
View
16 vimrc
@@ -595,20 +595,20 @@ if whoami != 'root'
nmap <leader>a <ESC>:Ack! --nobinary <cword><CR>
end
-if exists("$DISPLAY") && has("X11")
+if has("X11") && exists("$DISPLAY") && exists("$XAUTHORITY") && filereadable($XAUTHORITY)
vmap <F2> "*y
nmap <F2> <ESC>"*p
imap <F2> <ESC>"*p
vmap <F3> "+y
nmap <F3> <ESC>"+p
imap <F3> <ESC>"+p
-elseif exists("$DISPLAY") && exists("$XAUTHORITY") && ProgrPath(['xclip']) != '' && filereadable($XAUTHORITY)
- vmap <F2> :!xclip -i -f -selection secondary<CR>
- nmap <F2> <ESC>:r!xclip -o -selection secondary<CR>
- imap <F2> <ESC>:r!xclip -o -selection secondary<CR>
- vmap <F3> :!xclip -i -f -selection clip-board<CR>
- nmap <F3> <ESC>:r!xclip -o -selection clip-board<CR>
- imap <F3> <ESC>:r!xclip -o -selection clip-board<CR>
+elseif exists("$DISPLAY") && exists("$XAUTHORITY") && filereadable($XAUTHORITY) && ProgrPath(['xclip']) != ''
+ vmap <silent> <F2> :!xclip -i -f -selection secondary<CR>
+ nmap <silent> <F2> <ESC>:r!xclip -o -selection secondary<CR>
+ imap <silent> <F2> <ESC>:r!xclip -o -selection secondary<CR>
+ vmap <silent> <F3> :!xclip -i -f -selection clip-board<CR>
+ nmap <silent> <F3> <ESC>:r!xclip -o -selection clip-board<CR>
+ imap <silent> <F3> <ESC>:r!xclip -o -selection clip-board<CR>
else
vmap <F2> "vy
nmap <F2> <ESC>"vp

0 comments on commit a4467a1

Please sign in to comment.