Search Replace in VIM Script

2007-03-27 Thread oskar
this message in context: http://www.nabble.com/Search---Replace-in-VIM-Script-tf3473037.html#a9692208 Sent from the Vim - General mailing list archive at Nabble.com.

Re: Search Replace in VIM Script

2007-03-27 Thread Tim Chase
I have a vim script which I want to use to search replace a part out of a given line. The fields in the line are based on field length and the field I want to change starts at position 33 and ends after 4 charachter. A regex search is not appropriet, as the string I am looking for may

Re: Search Replace in VIM Script

2007-03-27 Thread Charles E Campbell Jr
oskar wrote: I have a vim script which I want to use to search replace a part out of a given line. The fields in the line are based on field length and the field I want to change starts at position 33 and ends after 4th character. A regex search is not appropriate, as the string I am looking

Re: Search Replace in VIM Script

2007-03-27 Thread Albie Janse van Rensburg
oskar wrote: Hello After searching the Internet for 3 hours and not finding an answer here the question: I have a vim script which I want to use to search replace a part out of a given line. The fields in the line are based on field length and the field I want to change starts at position 33

Re: Search Replace in VIM Script

2007-03-27 Thread Jean-Rene David
* oskar [2007.03.27 11:25]: I have a vim script which I want to use to search replace a part out of a given line. The fields in the line are based on field length and the field I want to change starts at position 33 and ends after 4 charachter. Sample data and the result you expect would

Re: Search Replace in VIM Script

2007-03-27 Thread A.J.Mechelynck
oskar wrote: Hello that works if I execute the command in the normal mode in VIM. Now my next question is: How can I use the %s command from a VIM script in order to modify a given line of a file? Thank you To change foo to bar everywhere at line 1234: 1234s/foo/bar/g (i.e., in a