From df13ca668d93bee000d0fd4ab5403b04f7e60a1c Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Mon, 22 Sep 2014 09:21:11 -0400 Subject: [PATCH] Tweaked project settings --- projects/gentex.vim | 44 ++++++++------------------------------------ projects/project.vim | 7 ++++++- 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/projects/gentex.vim b/projects/gentex.vim index 8fcb8ef..5257d37 100644 --- a/projects/gentex.vim +++ b/projects/gentex.vim @@ -28,9 +28,10 @@ function! RefreshCScope() execute('cscope kill -1') execute('cd ' . g:CScopeDir) execute('silent ! cscope -Rb') - call ConnectCScope() execute('cd ' . g:ProjectPath) + call ConnectCScope() endif + execute('redraw!') endfunction " Update the CTags File @@ -40,45 +41,16 @@ function! RefreshCTags() execute('silent ! ctags -R *') execute('cd ' . g:ProjectPath) endif + execute('redraw!') endfunction -" Execute Rake with the given targets and open the quickfix window -function! RunCmd(show_qf,task) - let cmd = 'silent !start /min cmd /c ' . a:task . ' > quickfix.txt 2>&1 ' . - \ '&gvim --servername ' . v:servername . - \ ' --remote-send ":cgetfile quickfix.txt' . - \ ((a:show_qf == 1) ? ':cope' : '') . - \ ':let g:CmdRunning = 0"' - - if !exists('g:CmdRunning') || (g:CmdRunning == 0) - execute(cmd) - let g:CmdRunning = 1 - else - echoerr 'Error: A background command is already running!' - endif -endfunction - -" Define a rake command -command! -nargs=* Rake call RunCmd(1, 'rake ' . '') -cnoreabbrev rake Rake - -" Define a rake command -command! -nargs=* Exec call RunCmd(0, '') -cnoreabbrev exec Exec -cnoreabbrev cmd Exec - "------------------------------------------------------------------------------ " Project Specific Key Mappings "------------------------------------------------------------------------------ -map -map :call RefreshCTags() -map :call RefreshCScope() -map :execute("find " . g:TestSrcPath . "/**/test_" . expand("%:t:r") . ".c") -map :Rake test:%:t:r.c -map :Rake bullseye:%:t:r.c -map :call RunCmd(1,'grep -rEn "TODO\|@bug\|@fix" Code/ Test/') -map :Rake release -map :Rake debug +map :call RefreshCTags():call RefreshCScope() +map :call RefreshCTags() +map :call RefreshCScope() +map :execute("find " . g:TestSrcPath . "/**/test_" . expand("%:t:r") . ".c") "============================================================================== " Doxygen Comment Configuration @@ -105,7 +77,7 @@ let g:DoxygenToolkit_authorExtra = "$HeadURL$" " Gentex style code formatting if( (&ft == "c") || (&ft == "cpp") ) setlocal cindent - setlocal cino={1s=1s:1s(1s + setlocal cino==1s:1s(1s elseif(&ft == "ruby") setlocal tabstop=2 setlocal shiftwidth=2 diff --git a/projects/project.vim b/projects/project.vim index 6e2158a..0d1aab2 100644 --- a/projects/project.vim +++ b/projects/project.vim @@ -28,9 +28,10 @@ function! RefreshCScope() execute('cscope kill -1') execute('cd ' . g:CScopeDir) execute('silent ! cscope -Rb') - call ConnectCScope() execute('cd ' . g:ProjectPath) + call ConnectCScope() endif + execute('redraw!') endfunction " Update the CTags File @@ -57,6 +58,10 @@ map :execute("find " . g:TestSrcPath . "/**/test_" . expand("%:t:r") . if( (&ft == "c") || (&ft == "cpp") ) setlocal cindent setlocal cino==1s:1s(1s +elseif(&ft == "ruby") + setlocal tabstop=2 + setlocal shiftwidth=2 + set softtabstop=2 endif "------------------------------------------------------------------------------ -- 2.49.0