how can I implement the following in VIM
substitute/regex_this_word/regex_with_another_word_from_the_same_line
e.g
select "ali" as name where _placeholder = _placeholder
union
select "sam" as name where _placeholder = _placeholder
after applying
:%s/_placeholder/anythin_between_quotation/
becomes
select "ali" as name where ali = ali
union
select "sam" as name where sam = sam
e.g2
select id, "_placeholder" as vul members_repeater/vul/none
after applying
:%s/_placehold/\=something_like_regexp(getline('.'),'regexp_pattern_to_select_everthing_after_/vul/")
becomes
select id, "none" as vul members_repeater/vul/none
thanks
this works in this case:
for example:
into
edit
new edit
so you can re-use the old routine :
this needs only one
vul/in your line, but there could be text after the keyword (with space as separator) something like:into
see this example :