vimrc

source $VIMRUNTIME/mswin.vim
behave mswin
set mouse=a nu ts=4 sw=4 ai ci si hls is backup undofile
color slate
map <F7> : ! g++ % -o %< -g -Wall -Wextra -Wconversion -Wshadow <CR>
map <F8> : ! time ./%< <CR>
map <F9> : ! gdb %< <CR>
set encoding=utf-8
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set tabstop=4
set shiftwidth=4
colorscheme slate
set lines=50 columns=85
set backupdir=C:/code/vimtmp/
set undodir=C:/code/vimtmp/
set guifont=Ubuntu_Mono:h14:cANSI
set autoindent
set nu
exec 'cd '.fnameescape('C:\code\')  
set autochdir
map <F6> : call O2()<CR>
func! O2()
exec "w"
exec "!g++ % -o %< -std=c++17 -O2 -Wl,-stack=1073741824"
endfunc
map <F7> : call CompileGpp()<CR>
func! CompileGpp()
exec "w"
exec "!g++ %  -g -o %< -std=c++17 -Wall -Wconversion -Wextra -Wshadow -Wl,-stack=1073741824"
endfunc
map <F8> :call Run()<CR>
func! Run()
exec "! %<"
endfunc
map <F9> :call Gdb()<CR>
func! Gdb()
exec "w"
exec "! gdb %<"
endfunc

map <F12> :call Headers()<CR>

func! Headers()
exec ":r C:\\code\\std.cpp"
exec ":1"
exec "d"
exec ":20"
endfunc