diff options
| author | Michal Hanus <hanus.michal@divelit.cz> | 2024-03-02 18:49:55 +0100 |
|---|---|---|
| committer | Michal Hanus <hanus.michal@divelit.cz> | 2024-03-02 18:49:55 +0100 |
| commit | aab38f32e0a02e43565a554d0a76ff65636499b8 (patch) | |
| tree | f3f00df05c63228c69a338e80fd0e7d02986e8cf /after/ftplugin/cpp.vim | |
| parent | 99353a355321d68ef4fb3c26291084b23e8f4978 (diff) | |
Diffstat (limited to 'after/ftplugin/cpp.vim')
| -rw-r--r-- | after/ftplugin/cpp.vim | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/after/ftplugin/cpp.vim b/after/ftplugin/cpp.vim deleted file mode 100644 index a8f76f3..0000000 --- a/after/ftplugin/cpp.vim +++ /dev/null @@ -1,39 +0,0 @@ -set commentstring=//\ %s - -" Disable inserting comment leader after hitting o or O or <Enter> -set formatoptions-=o -set formatoptions-=r - -nnoremap <silent> <buffer> <F9> :call <SID>compile_run_cpp()<CR> - -function! s:compile_run_cpp() abort - let src_path = expand('%:p:~') - let src_noext = expand('%:p:~:r') - " The building flags - let _flag = '-Wall -Wextra -std=c++11 -O2' - - if executable('clang++') - let prog = 'clang++' - elseif executable('g++') - let prog = 'g++' - else - echoerr 'No C++ compiler found on the system!' - endif - call s:create_term_buf('h', 20) - execute printf('term %s %s %s -o %s && %s', prog, _flag, src_path, src_noext, src_noext) - startinsert -endfunction - -function s:create_term_buf(_type, size) abort - set splitbelow - set splitright - if a:_type ==# 'v' - vnew - else - new - endif - execute 'resize ' . a:size -endfunction - -" For delimitMate -let b:delimitMate_matchpairs = "(:),[:],{:}" |
