diff --git a/autoload/SpaceVim/layers/lang/c.vim b/autoload/SpaceVim/layers/lang/c.vim index df6ebdc50..b50f42848 100644 --- a/autoload/SpaceVim/layers/lang/c.vim +++ b/autoload/SpaceVim/layers/lang/c.vim @@ -101,7 +101,13 @@ function! SpaceVim#layers#lang#c#config() abort \ } call SpaceVim#plugins#runner#reg_runner('c', [runner1, '#TEMP#']) call SpaceVim#mapping#space#regesit_lang_mappings('c', function('s:language_specified_mappings')) - call SpaceVim#plugins#runner#reg_runner('cpp', ['g++ -o #TEMP# %s', '#TEMP#']) + let runner2 = { + \ 'exe' : 'g++', + \ 'targetopt' : '-o', + \ 'opt' : ['-xc++', '-'], + \ 'usestdin' : 1, + \ } + call SpaceVim#plugins#runner#reg_runner('cpp', [runner2, '#TEMP#']) call SpaceVim#mapping#space#regesit_lang_mappings('cpp', funcref('s:language_specified_mappings')) call SpaceVim#plugins#projectmanager#reg_callback(funcref('s:update_clang_flag')) if executable('clang')