1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 05:20:04 +08:00

Add stdin support for c++

This commit is contained in:
Shidong Wang 2019-02-11 10:32:06 +08:00 committed by Wang Shidong
parent 71524080d4
commit 2800444231

View File

@ -101,7 +101,13 @@ function! SpaceVim#layers#lang#c#config() abort
\ } \ }
call SpaceVim#plugins#runner#reg_runner('c', [runner1, '#TEMP#']) call SpaceVim#plugins#runner#reg_runner('c', [runner1, '#TEMP#'])
call SpaceVim#mapping#space#regesit_lang_mappings('c', function('s:language_specified_mappings')) 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#mapping#space#regesit_lang_mappings('cpp', funcref('s:language_specified_mappings'))
call SpaceVim#plugins#projectmanager#reg_callback(funcref('s:update_clang_flag')) call SpaceVim#plugins#projectmanager#reg_callback(funcref('s:update_clang_flag'))
if executable('clang') if executable('clang')