vim | replacement question

2006-09-20 Thread Nikolaos A. Patsopoulos
Hi all! Another replacement question: how can I replace all occurrence of a pattern except a given one, e.g. the first or third? the code for all occurrences I use is: :%s/a.\{-}//g Thanks in advance, Nikos

Re: vim | replacement question

2006-09-20 Thread Nikolaos A. Patsopoulos
Yakov Lerner wrote: On 9/20/06, Nikolaos A. Patsopoulos [EMAIL PROTECTED] wrote: Hi all! Another replacement question: how can I replace all occurrence of a pattern except a given one, e.g. the first or third? the code for all occurrences I use is: :%s/a.\{-}//g /pattern/+1,$s///g Yakov

Re: vim | replacement question

2006-09-20 Thread Charles E Campbell Jr
Nikolaos A. Patsopoulos wrote: Another replacement question: how can I replace all occurrence of a pattern except a given one, e.g. the first or third? the code for all occurrences I use is: :%s/a.\{-}//g Thanks in advance, I see that others have given the answer to the specific

Re: vim | replacement question

2006-09-15 Thread Nikolaos A. Patsopoulos
A.J.Mechelynck wrote: Nikolaos A. Patsopoulos wrote: A.J.Mechelynck wrote: Nikolaos A. Patsopoulos wrote: Hi, another two questions: 1. I want to delete all text that has a specific pattern. I use the following code with s command but I want to keep the \a character in the beginning:

Re: vim | replacement question

2006-09-15 Thread A.J.Mechelynck
Nikolaos A. Patsopoulos wrote: A.J.Mechelynck wrote: Nikolaos A. Patsopoulos wrote: A.J.Mechelynck wrote: Nikolaos A. Patsopoulos wrote: Hi, another two questions: 1. I want to delete all text that has a specific pattern. I use the following code with s command but I want to keep the \a

Re: vim | replacement question

2006-09-15 Thread Tim Chase
To add an empty line at the end of the file GoEsc or in a script normal Go^[ where ^[ is hit Ctrl-V hit Esc (replace Ctrl-V by Ctrl-Q if you use Ctrl-V to paste the clipboard) Additionally, in a script, you can use :$put ='' to add empty lines at the bottom of the

vim | replacement question

2006-09-14 Thread Nikolaos A. Patsopoulos
Hi, another two questions: 1. I want to delete all text that has a specific pattern. I use the following code with s command but I want to keep the \a character in the beginning: :%s/\a,\_.\{-}\/td\/tr/ 2. how can I join lines that have non-numerical characters? e.g. 153 Purdue Canc Ct 1256

Re: vim | replacement question

2006-09-14 Thread A.J.Mechelynck
Nikolaos A. Patsopoulos wrote: Hi, another two questions: 1. I want to delete all text that has a specific pattern. I use the following code with s command but I want to keep the \a character in the beginning: :%s/\a,\_.\{-}\/td\/tr/ To delete everything that matches a certain pattern

Re: vim | replacement question

2006-09-14 Thread Nikolaos A. Patsopoulos
A.J.Mechelynck wrote: Nikolaos A. Patsopoulos wrote: Hi, another two questions: 1. I want to delete all text that has a specific pattern. I use the following code with s command but I want to keep the \a character in the beginning: :%s/\a,\_.\{-}\/td\/tr/ To delete everything that matches