epanda schrieb:
> HI,
> 
> I have this content :
> 
> <ds te="DMoat"><ppe id="GE" nerty="xml" ></ppe></ds>
> <ds te="DMoat"><ppe id="GE" nerty="CXML" ></ppe></ds>
> <ds te="DMoat"><ppe id="GE" nerty="SXML" ></ppe></ds>
> 
> Each begin of lines is the same. Only nerty attribute is different.
> 
> I wanna have this content :
> 
> <ds te="DMoat">
>   <ppe id="GE" nerty="xml" ></ppe>
>   <ppe id="GE" nerty="CXML" ></ppe>
>   <ppe id="GE" nerty="SXML" ></ppe>
> </ds>
> 
> How can I do this tranformation ?
> Thanks

With surround.vim:
http://vim.sf.net/scripts/script.php?script_id=1697

gg/<ds<Enter>               " move cursor onto the first <ds> tag
dstj.j.                     " delete 3 surrounding <ds> tags
vips<ds>                    " surround the paragraph with <ds></ds>

surround.vim parts: operator "ds", "v_s" (prompts for text, here "<ds>")

-- 
Andy

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

Reply via email to