On Sun, 22 Nov 2009 18:35:49 -0600 Tim Chase wrote: >> line ends and finishes with two bars: >> || dfjdfjd || dfjdkfjsd || sds || >> --> >> ||X dfjdfjd ||X dfjdkfjsd ||X sds ||
To be more precise, I know that - line begins with || - line ends with - there might be a succession of double bars (e.g. ||||||), in which case X must not be inserted. >For #1, that would be something like either of these: > > s/||\_$\@<!/& X/g works beautifully! Presumably, \_$\@<! means "anything but end of line" ? I can envisage the need for operating this substitution on every other line of a selected range! ||X dfjdfjd ||X dfjdkfjsd ||X sds || || dfjdfjd || dfjdkfjsd || sds || ||X dfjdfjd ||X dfjdkfjsd ||X sds || || dfjdfjd || dfjdkfjsd || sds || >When used in a mapping command, you need to either escape the >bars or use "<bar>" (5 character) ... > >I prefer the latter because it's a bit more readable to me agree! -- Best Regards, Tarlika Elisabeth Schmitz --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
