我怎麼能實現在VIM以下VIM每行替換在同一行基於另一個字一個字
substitute/regex_this_word/regex_with_another_word_from_the_same_line
如
select "ali" as name where _placeholder = _placeholder
union
select "sam" as name where _placeholder = _placeholder
應用
:%s/_placeholder/anythin_between_quotation/
後變成
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
施加後
:%s/_placehold/\=something_like_regexp(getline('.'),'regexp_pattern_to_select_everthing_after_/vul/")
變得
select id, "none" as vul members_repeater/vul/none
感謝
每行只有一個報價部分? – Kent 2013-02-15 15:59:58
好吧,我只是把它作爲一個例子,最終它是一個正則表達式,對吧? – Ali 2013-02-15 16:06:58