Update
git-svn-id: http://photonzero.com/dotfiles/trunk@81 23f722f6-122a-0410-8cef-c75bd312dd78
This commit is contained in:
parent
0ad6077023
commit
532e676884
5 changed files with 66 additions and 35 deletions
26
.vimrc
26
.vimrc
|
|
@ -71,6 +71,10 @@ let Tlist_Inc_Winwidth = 0
|
|||
let Tlist_WinWidth = 40
|
||||
let Tlist_Show_One_File = 0
|
||||
|
||||
let g:ConqueTerm_CWInsert = 1
|
||||
let g:ConqueTerm_InsertOnEnter = 0
|
||||
let g:ConqueTerm_SendVisKey = '<Leader>ss'
|
||||
|
||||
"MiniBufExplore Options
|
||||
"let g:miniBufExplMapWindowNavVim = 1
|
||||
"let g:miniBufExplMapWindowNavArrows = 1
|
||||
|
|
@ -239,7 +243,7 @@ function! HighlightTooLongLines()
|
|||
endfunction
|
||||
|
||||
let g:google = 0
|
||||
|
||||
let g:disable_google_optional_settings = 1
|
||||
if filereadable("/usr/share/vim/google/google.vim")
|
||||
source /usr/share/vim/google/google.vim
|
||||
let g:google = 1
|
||||
|
|
@ -266,7 +270,23 @@ if filereadable("/home/build/nonconf/google3/tools/tags/gtags.vim")
|
|||
nmap <C-]> :exe 'Gtlist ' . expand('<cword>')<CR>
|
||||
endif
|
||||
|
||||
" new shell execute that pipes output to window
|
||||
function! s:ExecuteInShell(command)
|
||||
let command = join(map(split(a:command), 'expand(v:val)'))
|
||||
let winnr = bufwinnr('^' . command . '$')
|
||||
silent! execute winnr < 0 ? 'botright new ' . fnameescape(command) : winnr . 'wincmd w'
|
||||
setlocal buftype=nowrite bufhidden=wipe nobuflisted noswapfile wrap number
|
||||
echo 'Executing ' . command . '...'
|
||||
silent! execute 'silent %!'. command
|
||||
" uncomment this if you want the new buffer to try to grow to accommodate the output
|
||||
"silent! execute 'resize ' . line('$')
|
||||
silent! redraw
|
||||
silent! execute 'au BufUnload <buffer> execute bufwinnr(' . bufnr('#') . ') . ''wincmd w'''
|
||||
silent! execute 'nnoremap <silent> <buffer> <LocalLeader>r :call <SID>ExecuteInShell(''' . command . ''')<CR>'
|
||||
echo 'Execution of ' . command . ' complete.'
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
command! -complete=shellcmd -nargs=+ Shell call s:ExecuteInShell(<q-args>)
|
||||
command! -nargs=* Make call s:ExecuteInShell('make '.<q-args>)
|
||||
command! -nargs=* Git call s:ExecuteInShell('git '.<q-args>)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue