Я использовал SingleCompile singlecompile, vim плагин для компиляции и запуска кода. он работает нормально, но я хочу настроить его, чтобы отобразить сообщение об ошибке компиляции и результат с разбиением текущего окна, например [this_result http://www.topbug.net/post-files/2012-03-07-use-singlecompile-to-compile-and-run-a-single-source-file-easily-in-vim/2.png].Как использовать SingleCompile, vim plugin, для компиляции и запуска c в текущем разделенном окне вместо возврата в окно bash?
Я следую за instruction шаг за шагом, но когда я ударил F5, чтобы скомпилировать и запустить код, vim выпрыгнет из текущего окна в bash, покажет результат и press ENTER or type command to continue
, он также, похоже, имеет какое-то отношение к буферу потому что предыдущие сообщения компиляции не удалялись.
присоединять мою ВИМ-версия:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 4 2012 04:25:35)
Included patches: 1-429
Modified by [email protected]
Compiled by [email protected]
Huge version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
-dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
+find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv
+insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
+mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
+mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme +netbeans_intg
+path_extra -perl +persistent_undo +postscript +printer +profile +python
-python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
-sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
-toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
мой vimrc:
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" General "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'ervandew/supertab'
Plugin 'tomtom/tlib_vim'
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'garbas/vim-snipmate'
Plugin 'vim-scripts/L9'
Plugin 'Rip-Rip/Clang_complete'
Plugin 'othree/vim-autocomplpop'
Plugin 'bling/vim-airline'
Plugin 'Townk/vim-autoclose'
Plugin 'xuhdev/SingleCompile'
call vundle#end()
filetype indent plugin on
syntax on
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim user interface "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set number
set hidden
set ignorecase
set hlsearch
set incsearch
set cursorline
""Don't redraw while executing macros (good performance config)
set lazyredraw
""source /etc/vim/Auto_SetTitle.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Colors and Fonts "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
colorscheme ir_black
set t_Co=256
set guifont=Monaco\ 12
highlight Pmenu ctermbg=240 ctermfg=48
highlight PmenuSel ctermbg=99
highlight CursorLine ctermbg=239 ctermfg=NONE
set laststatus=2
let g:airline_powerline_fonts = 1
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Useful shortcuts "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"Set key combination's map leader
let mapleader = ","
nmap <F4> :SCCompile<cr>
nmap <F5> :SCCompileRun<cr>
let g:SingleCompile_menumode = 2
let g:SingleCompile_split = 'tabe'
set switchbuf=split
set showcmd " Show (partial) command in status line.
set incsearch " Incremental search
set tabstop=3
set smartindent
set shiftwidth=3
set expandtab
set wildmode=list:longest,full
"Clang_complete And Supertab"
let g:clang_snippets=1
let g:clang_conceal_snippets=1
" The single one that works with clang_complete
let g:clang_snippets_engine='clang_complete'
"
" " Complete options (disable preview scratch window, longest removed to aways
" " show menu")
set completeopt=menu,menuone
"
" Limit popup menu height
set pumheight=20
" SuperTab completion fall-back
let g:SuperTabDefaultCompletionType='<c-x><c-u><c-p>'