title: Vim settings for C and C++?
body: <p>Creating new files with c extension comes with processing errors. I was using Clion on my other machines but after giving a thought, I decided to move to vim where I do most of my other languages work.</p>
  
  <p>My dotfile for c and plugins? </p>
  
  <pre><code>Plugin 'luchermitte/lh-cpp'
  Plugin 'cscope.vim'
  Plugin 'c.vim'
  
  " += C.vim config
  let  g:C_UseTool_cmake    = 'yes'
  let  g:C_UseTool_doxygen = 'yes'
  </code></pre>
  
  <p>Errors: I want to resolve these errors.</p>
  
  <pre><code>Error detected while processing /Users/frrank/.vim/bundle/lh-cpp/ftplugin/c/c_menu.vim:
  line   43:
  E117: Unknown function: lh#option#get
  E15: Invalid expression: lh#option#get('c_menu_priority', '50', 'g')
  line   44:
  E117: Unknown function: lh#option#get
  E15: Invalid expression: lh#option#get('c_menu_name',     '&amp;C++', 'g')
  line   66:
  E121: Undefined variable: s:menu_prio
  E15: Invalid expression: 'amenu &lt;silent&gt; '.s:menu_prio.'.100 '.escape(s:menu_name.'.-100-', '\ '). ' &lt;Nop&gt;'
  line   69:
  E121: Undefined variable: s:menu_prio
  E15: Invalid expression: 'amenu &lt;silent&gt; '.s:menu_prio.'.100.1 '. escape(s:menu_name.'.&amp;Help.&amp;Contents', '\ '). ' :help lh-cpp-readme.txt&lt;cr&gt;'
  line   72:
  E121: Undefined variable: s:menu_prio
  E15: Invalid expression: 'amenu &lt;silent&gt; '.s:menu_prio.'.100.2 '. escape(s:menu_name.'.&amp;Help.&amp;Features', '\ '). ' :help lh-cpp-features&lt;cr&gt;'
  line   75:
  E121: Undefined variable: s:menu_prio
  E15: Invalid expression: 'amenu &lt;silent&gt; '.s:menu_prio.'.100.3 '. escape(s:menu_name.'.&amp;Help.&amp;First Steps', '\ '). ' :help lh-cpp-first-steps&lt;cr&gt;'
  line   79:
  E121: Undefined variable: s:menu_prio
  E15: Invalid expression: 'amenu &lt;silent&gt; '.s:menu_prio.'.100.20.10 '. escape(s:menu_name.'.&amp;Help.Code &amp;snippets.&amp;Brackets', '\ '). ' :help brackets-for-C&lt;cr&gt;'
  line   82:
  E121: Undefined variable: s:menu_prio
  E15: Invalid expression: 'amenu &lt;silent&gt; '.s:menu_prio.'.100.20.20 '. escape(s:menu_name.'.&amp;Help.Code &amp;snippets.&amp;C snippets', '\ '). ' :help C_control-statements&lt;cr&gt;'
  Error detected while processing /Users/frrank/.vim/bundle/lh-cpp/ftplugin/c/c_pvs-2-qf.vim:
  
  Error detected while processing /Users/frrank/.vim/bundle/lh-cpp/ftplugin/c/c_snippets.vim:
  line   65:
  E492: Not an editor command: :Brackets #if\ 0 #endif -insert=0 -nl -trigger=&lt;localleader&gt;0
  line   68:
  E492: Not an editor command: :Brackets #if\ 0 #else!mark!\n#endif -insert=0 -nl -trigger=&lt;localleader&gt;1
  line   81:
  E492: Not an editor command:   Inoreabbr &lt;buffer&gt; &lt;silent&gt; if &lt;C-R&gt;=lh#cpp#snippets#def_abbr('if ', '\&lt;c-f\&gt;if(!cursorhere!){!mark!}!mark!')&lt;cr&gt;
  line   95:
  E492: Not an editor command:   Inoreabbr &lt;buffer&gt; &lt;silent&gt; elif &lt;C-R&gt;=lh#cpp#snippets#def_abbr('elif ', '\&lt;c-f\&gt;else if(!cursorhere!) {!mark!}!mark!')&lt;cr&gt;
  line  109:
  E492: Not an editor command:   Inoreabbr &lt;buffer&gt; &lt;silent&gt; else &lt;C-R&gt;=lh#cpp#snippets#insert_if_not_before('else ', '\&lt;c-f\&gt;else{!cursorhere!}!mark!', 'if')&lt;cr&gt;&lt;c-f&gt;
  line  123:
  E492: Not an editor command:   Inoreabbr &lt;buffer&gt; &lt;silent&gt; for &lt;C-R&gt;=lh#cpp#snippets#def_abbr('for ', { '! lh#cpp#use_cpp11()': '\&lt;c-f\&gt;for(!cursorhere!;!mark!;!mark!){!mark!}!mark!
  ', '  lh#cpp#use_cpp11()': '\&lt;c-f\&gt;for(!cursorhere!){!mark!}!mark!' })&lt;cr&gt;
  line  133:
  E492: Not an editor command:   Inoreabbr &lt;buffer&gt; &lt;silent&gt; while &lt;C-R&gt;=lh#cpp#snippets#def_abbr('while ', '\&lt;c-f\&gt;while(!cursorhere!){!mark!}!mark!')&lt;cr&gt;
  line  152:
  E492: Not an editor command:   Inoreabbr &lt;buffer&gt; &lt;silent&gt; do &lt;C-R&gt;=lh#cpp#snippets#def_abbr('do ', '\&lt;c-f\&gt;do{!cursorhere!}while(!mark!);!mark!')&lt;cr&gt;&lt;c-f&gt;
  line  179:
  E492: Not an editor command:   Inoreabbr &lt;buffer&gt; &lt;silent&gt; switch &lt;C-R&gt;=lh#cpp#snippets#def_abbr('switch ', '\&lt;c-f\&gt;switch(!cursorhere!){!mark!}!mark!')&lt;cr&gt;
  line  202:
  E492: Not an editor command:   Brackets /* */ -visual=0
  line  203:
  E492: Not an editor command:   Brackets /* */ -visual=0 -trigger=&lt;kDivide&gt;&lt;kMultiply&gt;
  line  205:
  E492: Not an editor command:   Brackets /* */ -insert=0 -trigger=&lt;m-v&gt;
  Error detected while processing /Users/frrank/.vim/bundle/lh-cpp/ftplugin/c/previewWord.vim:
  line   46:
  E117: Unknown function: lh#mapping#plug
  line   50:
  E117: Unknown function: lh#mapping#plug
  line   64:
  E117: Unknown function: lh#menu#def_toggle_item
  line   66:
  E117: Unknown function: lh#mapping#plug 
  </code></pre>