pansz <[email protected]> [09-09-27 12:56]:
> 
> [email protected] 写道:
> > When working under UNIX/Linux:
> > cd <directory with files>
> > sed -i 's/<old symbol>/<new symbol>/g' *
> 
> Will this really work? the OP has a source tree, and he only want to 
> replace the related files. i.e. if there is a global var foobar, a class 
> var abc.foobar, a local var foobar, a string with the content "abc 
> foobar xyz" and some comment with the text foobar. only those he want 
> like the global foobar should be replaced.
> 
> Only cscope had the syntax scan and knows which is an identifier instead 
> of the content in a string, so only cscope knows which occurrence should 
> be replaced.
> 
> sed is not going to work for identifier replacement, because it knows 
> only the text, it does not know semantically the text is an identifier 
> or a string or a comment or class member.
> 
> 
> 
See question 2 of the initial posting.
For me, it sounds like replacing "all symbols"...

Otzheriwse this is neither a job for vim nor for sed, since
both are textual related tools.



-- 
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.


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

Reply via email to