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