title: Search for a particular pattern and replace any word or line above it with a new pattern
body: <p>Suppose I have the following sentence:</p>
  
  <pre class="lang-none prettyprint-override"><code>jack and jill
  climbs up a hill
  </code></pre>
  
  <p>I want to search for <code>hill</code> in file and replace <code>jill</code> by <code>jerry</code>, i.e, the line above it while <code>hill</code> remains as it is. Is it possible using the vim editor or awk/sed?</p>