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.
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
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
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
* 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
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