按F5可进行编译和调试C++++程序,按F6编译和运行C++程序
详细配置如下:
set nocompatible
set number
set wrap!
filetype on
set history=50
filetype plugin on
"set background=dark
colorscheme pablo
syntax on
set cursorline
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set softtabstop=4
set noexpandtab
set smarttab
set showcmd
set showmode
set showmatch
set vb t_vb=
set ruler
set hls
set incsearch
set cin
set mouse=a
set cindent
set sm
set ai
"G+++ Compiler
map <F5> :call CompileRunGplusplus()<CR>
func! CompileRunGplusplus()
exec "w"
exec "!g++ % -g -o %<"
exec "! ./%<"
endfunc
map <F6> :call ">DebugGplusplus()<CR>
fun! DebugGplusplus()
exec "!g++ % -g -o %<"
exec "! gdb %<"
endfun
如果你不习惯黑色的说!
可以在终端的菜单里面点“编辑”->“当前配置文件”->“颜色”
然后就可以随便改了
时间: 2024-10-31 12:16:35