Hi All,

Just implemented this BRILLIANT tip for copying/pasting to/from the
windows clipboard in VIM under Cygwin.
http://vim.wikia.com/wiki/Using_the_Windows_clipboard_in_Cygwin_Vim

Was trying to work out how to modify the copy function to make it cut
instead. Originally, the copy function is:

function! Putclip(type, ...) range
  let sel_save = &selection
  let &selection = "inclusive"
  let reg_save = @@
  if a:type == 'n'
    silent exe a:firstline . "," . a:lastline . "y"
  elseif a:type == 'c'
    silent exe a:1 . "," . a:2 . "y"
  else
    silent exe "normal! `<" . a:type . "`>y"
  endif
  call system('putclip', @@)
  let &selection = sel_save
  let @@ = reg_save
endfunction

I tried replacing "y" with "d", but that didn't work.. can anyone
guide me as to how to make it cut?

Thanks for any advice!

Rob
:)
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to