title: Using inline if operator in .vimrc
body: <p>I am trying to implement a toggle between absolute and variable line numbering in vim and I'd like to do as a one liner instead of writing an if function.</p>
  
  <p>My current code is:</p>
  
  <pre><code>nnoremap &lt;F4&gt; :( &amp;rnu == 1 ? "set nu" : "set rnu" )&lt;CR&gt;
  </code></pre>
  
  <p>which does not work; anybody knows how can I make it work?</p>