Skip to content
Browse files

Make it possible to exchange data between vim sessions without clipboard

  • Loading branch information...
1 parent d20ac8f commit 9aaea8ed3aff2e932c768f88d7578cbb0c9f540c @graudeejs committed Jul 27, 2012
Showing with 11 additions and 6 deletions.
  1. +11 −6 vimrc
View
17 vimrc
@@ -641,12 +641,17 @@ elseif exists("$DISPLAY") && exists("$XAUTHORITY") && filereadable($XAUTHORITY)
nmap <silent> <F3> <ESC>:r!xclip -o -selection clipboard<CR>
imap <silent> <F3> <ESC>:r!xclip -o -selection clipboard<CR>
else
- vmap <F2> "vy
- nmap <F2> <ESC>"vp
- imap <F2> <ESC>"vp
- vmap <F3> "zy
- nmap <F3> <ESC>"zp
- imap <F3> <ESC>"zp
+ " vmap <F2> :execute 'write ' . vim_tmp . '/clip1'
+ " nmap <F2> <ESC>:execute 'read ' . vim_tmp . '/clip1'
+ vmap <F2> :write ~/.vim_clip1
+ nmap <F2> <ESC>:read ~/.vim_clip1
+ imap <F2> <ESC>:read ~/.vim_clip1
+
+ " nmap <F3> <ESC>:execute 'read ' . vim_tmp . '/clip2'
+ " imap <F3> <ESC>:execute 'read ' . vim_tmp . '/clip2'
+ vmap <F3> :write ~/.vim_clip2
+ nmap <F3> <ESC>:read ~/.vim_clip2
+ imap <F3> <ESC>:read ~/.vim_clip2
endif
" F1 is mapped by ftplugins

0 comments on commit 9aaea8e

Please sign in to comment.
Something went wrong with that request. Please try again.