Bee wrote:
> 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

ok... this works.

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

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

-- 
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