Skip to content

Commit 5186be1

Browse files
Jason Heddingsvim-scripts
authored andcommitted
Version 1.0: Initial upload
0 parents  commit 5186be1

3 files changed

Lines changed: 115 additions & 0 deletions

File tree

README

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This is a mirror of http://www.vim.org/scripts/script.php?script_id=1375
2+
3+
QFixToggle allows you to toggle the visibility of the |quickfix| window
4+
easilly. The goal is to provide easy access to the error list when
5+
programming or searching for text.
6+
7+
Thanks to Hari for the help on the auto-commands.

doc/qfixtoggle.txt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
*qfixtoggle.txt* Toggle the visibility of the quickfix window
2+
3+
Author: Jason Heddings ([email protected])
4+
For Vim version 6.0 and above
5+
Last change: 05 October, 2005
6+
7+
1. Overview |qfixtoggle-about|
8+
2. Commands |qfixtoggle-commands|
9+
3. Configuration |qfixtoggle-configure|
10+
11+
==============================================================================
12+
*qfixtoggle-about*
13+
1. Overview~
14+
15+
QFixToggle allows you to toggle the visibility of the |quickfix| window
16+
easilly. The goal is to provide easy access to the error list when
17+
programming or searching for text.
18+
19+
Thanks to Hari for the help on the auto-commands.
20+
21+
==============================================================================
22+
*qfixtoggle-commands*
23+
2. Commands~
24+
25+
The QFixToggle plugin does not create any automatic mappings, but provides the
26+
following commands:
27+
28+
|:QFix| toggle the visibility of the |quickfix| window
29+
30+
*:QFix*
31+
:QFix[!]
32+
This command toggle the visibility
33+
cause any existing preview windows to be closed. If the file is
34+
already open in another buffer, that buffer will be wiped out.
35+
36+
Once open, the window accepts all preview window commands. For example, to
37+
close the preview window, use |:pclose|.
38+
39+
==============================================================================
40+
*qfixtoggle-configure*
41+
2. Configuration~
42+
43+
QFixToggle may be customized using variables set by the |let| command in your
44+
.vimrc file. The default values for the options are shown in square brackets.
45+
46+
|'QFixToggle_Height'| Specify the height of the quickfix window [10]
47+
48+
*'QFixToggle_Height'*
49+
QFixToggle_Height~
50+
Using this setting, you can alter the height of the quickfix window that is
51+
created when |:QFix| is called. >
52+
let g:QFixToggle_Height = 12
53+
<
54+
==============================================================================
55+
vim:textwidth=78:tabstop=8:noexpandtab:filetype=help

plugin/qfixtoggle.vim

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
" File: qfixtoggle.vim
2+
" Author: Jason Heddings (vim at heddway dot com)
3+
" Version: 1.0
4+
" Last Modified: 05 October, 2005
5+
"
6+
" See ':help qfixtoggle' for more information.
7+
"
8+
if exists('g:QFixToggle_Loaded')
9+
finish
10+
endif
11+
let g:QFixToggle_Loaded = 1
12+
13+
14+
" set the default options for the plugin
15+
if !exists("g:QFixToggle_Height")
16+
let g:QFixToggle_Height = 10
17+
endif
18+
19+
20+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
21+
" toggles the quickfix window.
22+
command -bang -nargs=0 QFix call QFixToggle(<bang>0)
23+
function! QFixToggle(forced)
24+
if exists("g:QFixToggle_Bufnr") && a:forced == 0
25+
cclose
26+
else
27+
execute "copen " . g:QFixToggle_Height
28+
endif
29+
endfunction
30+
31+
32+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
33+
" perform setup operations for the quickfix window
34+
function QFixToggle_Setup()
35+
let g:QFixToggle_Bufnr = bufnr("$")
36+
endfunction
37+
38+
39+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
40+
" called to determine if the quickfix window is closed
41+
function QFixToggle_Closed()
42+
if exists("g:QFixToggle_Bufnr") && expand("<abuf>") == g:QFixToggle_Bufnr
43+
unlet! g:QFixToggle_Bufnr
44+
endif
45+
endfunction
46+
47+
48+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
49+
" used to track the quickfix window
50+
augroup QFixToggle
51+
autocmd BufWinEnter quickfix call QFixToggle_Setup()
52+
autocmd BufWinLeave * call QFixToggle_Closed()
53+
augroup END

0 commit comments

Comments
 (0)