Update vimrc
This commit is contained in:
parent
1b9f280203
commit
9767cdd724
|
@ -127,3 +127,4 @@ bootable
|
||||||
virtualized
|
virtualized
|
||||||
VM
|
VM
|
||||||
multithreading
|
multithreading
|
||||||
|
toolsets
|
||||||
|
|
Binary file not shown.
|
@ -1,7 +1,6 @@
|
||||||
/*=======================================================================================
|
/*==================================================================================================
|
||||||
File:
|
File:
|
||||||
Creation Date:
|
Creation Date:
|
||||||
Last Modified:
|
|
||||||
Creator: Michael Campagnaro
|
Creator: Michael Campagnaro
|
||||||
Notice: (C) Copyright $year by Jelly Pixel, Inc. All Rights Reserved.
|
Notice: (C) Copyright $year by Jelly Pixel, Inc. All Rights Reserved.
|
||||||
=======================================================================================*/
|
================================================================================================*/
|
||||||
|
|
20
vimrc
20
vimrc
|
@ -62,6 +62,7 @@ Plug 'tpope/vim-obsession' " Continuously updated session files
|
||||||
Plug 'tpope/vim-fugitive' " Git wrapper
|
Plug 'tpope/vim-fugitive' " Git wrapper
|
||||||
Plug 'tpope/vim-classpath' " TODO: still need this?
|
Plug 'tpope/vim-classpath' " TODO: still need this?
|
||||||
Plug 'junegunn/goyo.vim' " Distraction-free mode with centered buffer
|
Plug 'junegunn/goyo.vim' " Distraction-free mode with centered buffer
|
||||||
|
Plug 'fedorenchik/VimCalc3'
|
||||||
|
|
||||||
" Automatically discover and 'properly' update ctags files on save
|
" Automatically discover and 'properly' update ctags files on save
|
||||||
Plug 'craigemery/vim-autotag'
|
Plug 'craigemery/vim-autotag'
|
||||||
|
@ -325,9 +326,9 @@ augroup campoCmds
|
||||||
|
|
||||||
" C/C++ template
|
" C/C++ template
|
||||||
autocmd bufnewfile *.{c,cc,cpp,h,hpp} 0r ~/.vim/templates/c_header_notice
|
autocmd bufnewfile *.{c,cc,cpp,h,hpp} 0r ~/.vim/templates/c_header_notice
|
||||||
autocmd bufnewfile *.{c,cc,cpp,h,hpp} exe "2," . 7 . "g/File:.*/s//File: " .expand("%")
|
autocmd bufnewfile *.{c,cc,cpp,h,hpp} exe "2," . 6 . "g/File:.*/s//File: " .expand("%")
|
||||||
autocmd bufnewfile *.{c,cc,cpp,h,hpp} exe "2," . 7 . "g/Creation Date:.*/s//Creation Date: " .strftime("%Y-%m-%d")
|
autocmd bufnewfile *.{c,cc,cpp,h,hpp} exe "2," . 6 . "g/Creation Date:.*/s//Creation Date: " .strftime("%Y-%m-%d")
|
||||||
autocmd bufnewfile *.{c,cc,cpp,h,hpp} exe "2," . 7 . "g/$year/s//" .strftime("%Y")
|
autocmd bufnewfile *.{c,cc,cpp,h,hpp} exe "2," . 6 . "g/$year/s//" .strftime("%Y")
|
||||||
function! s:InsertHeaderGates()
|
function! s:InsertHeaderGates()
|
||||||
let gatename = substitute(toupper(expand("%:t")), "\\.", "_", "g")
|
let gatename = substitute(toupper(expand("%:t")), "\\.", "_", "g")
|
||||||
execute "normal! ggO#ifndef " . gatename
|
execute "normal! ggO#ifndef " . gatename
|
||||||
|
@ -744,19 +745,28 @@ function! HideBuildResultsAndClearErrors()
|
||||||
call asyncrun#quickfix_toggle(g:build_window_size, 0)
|
call asyncrun#quickfix_toggle(g:build_window_size, 0)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! HideAsyncResults()
|
||||||
|
call asyncrun#quickfix_toggle(g:build_window_size, 0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! ToggleBuildResults()
|
function! ToggleBuildResults()
|
||||||
call asyncrun#quickfix_toggle(g:build_window_size)
|
call asyncrun#quickfix_toggle(g:build_window_size)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! StopRunTask()
|
function! StopRunTask()
|
||||||
AsyncStop
|
AsyncStop
|
||||||
call asyncrun#quickfix_toggle(g:build_window_size, 0)
|
call HideAsyncResults()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ExecuteRunScript()
|
function! ExecuteRunScript()
|
||||||
exec "AsyncRun! -post=call\\ StopRunTask() ./run"
|
exec "AsyncRun! -post=call\\ StopRunTask() ./run"
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! SilentBuild()
|
||||||
|
AsyncStop
|
||||||
|
exec "AsyncRun! -save=2 -post=call\\ HideAsyncResults() ./build*"
|
||||||
|
endfunction
|
||||||
|
|
||||||
" Show results window the moment the async job starts
|
" Show results window the moment the async job starts
|
||||||
augroup vimrc
|
augroup vimrc
|
||||||
autocmd User AsyncRunStart call asyncrun#quickfix_toggle(g:build_window_size, 1)
|
autocmd User AsyncRunStart call asyncrun#quickfix_toggle(g:build_window_size, 1)
|
||||||
|
@ -771,7 +781,7 @@ noremap <F10> :call HideBuildResultsAndClearErrors()<cr>
|
||||||
|
|
||||||
" Execute build script
|
" Execute build script
|
||||||
nnoremap <leader>b :AsyncRun! -save=2 ./build*<cr>
|
nnoremap <leader>b :AsyncRun! -save=2 ./build*<cr>
|
||||||
nnoremap <F8> :AsyncRun! -save=2 ./build*<cr>
|
nnoremap <F8> :call SilentBuild()<cr>
|
||||||
|
|
||||||
" Execute run script
|
" Execute run script
|
||||||
nnoremap <leader>br :call ExecuteRunScript()<cr>
|
nnoremap <leader>br :call ExecuteRunScript()<cr>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user