Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a plugin support for Denite; quickfix opens with Denite, if installed #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 29 additions & 25 deletions plugin/gutentags_plus.vim
Original file line number Diff line number Diff line change
Expand Up @@ -161,36 +161,40 @@ command! -nargs=0 GscopeAdd call s:GscopeAdd()
" open quickfix
"----------------------------------------------------------------------
function! s:quickfix_open(size)
function! s:WindowCheck(mode)
if &buftype == 'quickfix'
let s:quickfix_open = 1
let s:quickfix_wid = winnr()
return
endif
if a:mode == 0
let w:quickfix_save = winsaveview()
else
if exists('w:quickfix_save')
call winrestview(w:quickfix_save)
unlet w:quickfix_save
if exists(":Denite") == 2
exec "Denite quickfix"
else
function! s:WindowCheck(mode)
if &buftype == 'quickfix'
let s:quickfix_open = 1
let s:quickfix_wid = winnr()
return
endif
if a:mode == 0
let w:quickfix_save = winsaveview()
else
if exists('w:quickfix_save')
call winrestview(w:quickfix_save)
unlet w:quickfix_save
endif
endif
endfunc
let s:quickfix_open = 0
let l:winnr = winnr()
noautocmd windo call s:WindowCheck(0)
noautocmd silent! exec ''.l:winnr.'wincmd w'
if s:quickfix_open != 0
if get(g:, 'gutentags_plus_switch', 0) != 0
noautocmd silent! exec ''.s:quickfix_wid.'wincmd w'
endif
return
endif
endfunc
let s:quickfix_open = 0
let l:winnr = winnr()
noautocmd windo call s:WindowCheck(0)
noautocmd silent! exec ''.l:winnr.'wincmd w'
if s:quickfix_open != 0
exec 'botright copen '. ((a:size > 0)? a:size : '')
noautocmd windo call s:WindowCheck(1)
noautocmd silent! exec ''.l:winnr.'wincmd w'
if get(g:, 'gutentags_plus_switch', 0) != 0
noautocmd silent! exec ''.s:quickfix_wid.'wincmd w'
endif
return
endif
exec 'botright copen '. ((a:size > 0)? a:size : '')
noautocmd windo call s:WindowCheck(1)
noautocmd silent! exec ''.l:winnr.'wincmd w'
if get(g:, 'gutentags_plus_switch', 0) != 0
noautocmd silent! exec ''.s:quickfix_wid.'wincmd w'
endif
endfunc

Expand Down