> Ooh, I didn't know that you could use ":-" as a shorthand for ":.-1"
> ... nice to know!
Thanks for quick answer. Below you can find the updated script. I find
it very useful because usually I open several files in tabs. Then I
can copy pieces of texts between the tabs very easily.
Laszlo
=====
"VimTip 66: Transfer text between two Vim 'sessions'
" transfer/read and write one block of text between vim sessions
" Usage:
" `from' session:
" ma
" move to end-of-block
" xw
"
" `to' session:
" move to where I want block inserted
" xr
"
if has("unix")
nmap xr :r $HOME/.vimxfer<CR>
nmap xR :-r $HOME/.vimxfer<CR>
nmap xw :'a,.w! $HOME/.vimxfer<CR>
vmap xr c<esc>:r $HOME/.vimxfer<CR>
vmap xR c<esc>:-r $HOME/.vimxfer<CR>
vmap xw :w! $HOME/.vimxfer<CR>
else
nmap xr :r c:/.vimxfer<CR>
nmap xR :-r c:/.vimxfer<CR>
nmap xw :'a,.w! c:/.vimxfer<CR>
vmap xr c<esc>:r c:/.vimxfer<cr>
vmap xR c<esc>:-r c:/.vimxfer<cr>
vmap xw :w! c:/.vimxfer<CR>
endif
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---