ncm2 / ncm2-d

:sparkles: ncm2 autocompletion source for D
Apache License 2.0
11 stars 1 forks source link

Fix vimscript load guard, fix g:ncm2_d#... initializations #5

Closed roxma closed 5 years ago

roxma commented 5 years ago
  1. Vimscript in autoload/*.vim could get reloaded every time a undefined function ncm2_d#foobar is called. Undefined function should not happen normally. But adding a guard stops the script from messing up further when bad things happen.

  2. Replace get(g:, 'g:name', default) with get(g:, 'name', default). This allows user to define their own g:name config.

viniarck commented 5 years ago

Thanks @roxma. Appreciated this PR!