vi/vim :move -2 :move +2 - moves line search text and replace :%s/search/replace/gc
vi :move -2 :move +2 - moves line in vi search text and replace :%s/search/replace/gc Here "pattern" represents the old string and "replace" represents the new string. For example, to replace each occurrence of the word "lemon" in a line with "orange," type: :s/lemon/orange/ The syntax for replacing every occurrence of a string in the entire text is similar. The only difference is the addition of a "%" in front of the "s": :%s/pattern/replace/