 <p>One method may be to select the appropiate column range using the Visual mode (control+v)</p> <p>Once selected, the search and replace can be done using (<a href="http://stackoverflow.com/questions/773137/find-and-replace-within-selection-in-vi">see this question</a>)</p> <pre><code> %s/\%Vfoo/bar/g </code></pre> <p>A regular expression for not test can be found here: <a href="http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word">Regular expression to match string not containing a word?</a></p>