나는 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]와 같이 조정하고 싶습니다.vim 플러그인 인 SingleCompile을 사용하여 bash 창으로 돌아가는 대신 현재 분할 창에서 c를 컴파일하고 실행하는 방법?
나는 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>'