title: How can I put a constant prefix in front of every new line in Vim as I type?
body: <p>Ok, this is a rather complicated desire. It stems from the fact that most of my Fortran lines contain a &quot;call&quot; statement, and I am tired of typing call, call, call, call...</p>
  <p>What I would like to have is the following:</p>
  <ul>
  <li>every time I press <kbd>Enter</kbd>, the next line has a &quot;call &quot; string added automatically in front.</li>
  <li>if I press tab, the tab is added <em>in front</em> of the string call (so that I can indent)</li>
  <li>if I am at the beginning of the line, and I press backspace once, it will remove the &quot;call &quot; entry, but leave the tabs. Similarly, it would be nice if it could remove automatically the entry if I type &quot;if &quot;, &quot;do &quot;, &quot;enddo&quot; and all the related</li>
  </ul>
  <p>Does anything like this already exists, is possible, and what are some hints or similar scripts I can take from?</p>
  <p>For example, in the C-style comment, every time I press <kbd>Enter</kbd>, an asterisk is added automatically at the beginning of the line. Where is the code that does that (I assume it's plugin functionality, not hardcoded in Vim)?</p>