How can the x be moved into the ReplaceWithEncoding() function?

This will replace the selected text with the encoded text and restore
the " register.

function ReplaceWithEncoding()
  let save = @0
  let @" = Encode(@")
  normal P
  let @" = save
endfun

vmap <F5> x:call ReplaceWithEncoding()<cr>

-Bill

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to