title: Setting buffer specific variables in Vim
body: <p>I'm trying to set a buffer-local variable to a global variable if the local variable is not defined using the following autocmd</p>
  
  <pre><code>au BufEnter * if !exists('b:Variable') | let b:Variable = g:Variable | endif
  </code></pre>
  
  <p>However, b:Variable is not getting defined. What am I doing incorrect here?</p>
  
  <p>EDIT: To rephrase/clarify, b:Variable is being used in the file. The error is that <code>b:Variable is not defined</code>.</p>