Skip to content
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
106 changes: 53 additions & 53 deletions plugin/qfixtoggle.vim
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
" File: qfixtoggle.vim
" Author: Jason Heddings (vim at heddway dot com)
" Version: 1.0
" Last Modified: 05 October, 2005
"
" See ':help qfixtoggle' for more information.
"
if exists('g:QFixToggle_Loaded')
finish
endif
let g:QFixToggle_Loaded = 1
" set the default options for the plugin
if !exists("g:QFixToggle_Height")
let g:QFixToggle_Height = 10
endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" toggles the quickfix window.
command -bang -nargs=0 QFix call QFixToggle(<bang>0)
function! QFixToggle(forced)
if exists("g:QFixToggle_Bufnr") && a:forced == 0
cclose
else
execute "copen " . g:QFixToggle_Height
endif
endfunction
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" perform setup operations for the quickfix window
function QFixToggle_Setup()
let g:QFixToggle_Bufnr = bufnr("$")
endfunction
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" called to determine if the quickfix window is closed
function QFixToggle_Closed()
if exists("g:QFixToggle_Bufnr") && expand("<abuf>") == g:QFixToggle_Bufnr
unlet! g:QFixToggle_Bufnr
endif
endfunction
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" used to track the quickfix window
augroup QFixToggle
autocmd BufWinEnter quickfix call QFixToggle_Setup()
autocmd BufWinLeave * call QFixToggle_Closed()
augroup END
" File: qfixtoggle.vim
" Author: Jason Heddings (vim at heddway dot com)
" Version: 1.0
" Last Modified: 05 October, 2005
"
" See ':help qfixtoggle' for more information.
"
if exists('g:QFixToggle_Loaded')
finish
endif
let g:QFixToggle_Loaded = 1


" set the default options for the plugin
if !exists("g:QFixToggle_Height")
let g:QFixToggle_Height = 10
endif


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" toggles the quickfix window.
command -bang -nargs=0 QFix call QFixToggle(<bang>0)
function! QFixToggle(forced)
if exists("g:QFixToggle_Bufnr") && a:forced == 0
cclose
else
execute "copen " . g:QFixToggle_Height
endif
endfunction


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" perform setup operations for the quickfix window
function QFixToggle_Setup()
let g:QFixToggle_Bufnr = bufnr("$")
endfunction


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" called to determine if the quickfix window is closed
function QFixToggle_Closed()
if exists("g:QFixToggle_Bufnr") && expand("<abuf>") == g:QFixToggle_Bufnr
unlet! g:QFixToggle_Bufnr
endif
endfunction


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" used to track the quickfix window
augroup QFixToggle
autocmd BufWinEnter quickfix call QFixToggle_Setup()
autocmd BufWinLeave * call QFixToggle_Closed()
augroup END