Hi All,

I am having trouble implementing a function to do a find and replace
over selected text (if text is selected) or over the entire document
(if no text is selected).

So far I have failed just to get the first part of replacing in visual
mode working. Here is what I have so far:

fun! EscapeHtmlChars()
  :'<,'>s/</\&lt;/g
  :'<,'>s/>/\&gt;/g
endfun

Can anyone let me know what I am doing wrong here?

Thanks for any assistance!

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

Reply via email to