forked from jceb/vim-editqf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
180 lines (143 loc) · 7.64 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
*editqf.txt* For Vim version 7.3 Last change: 2011 August 27
==============================================================================
EditQF *editqf* *editqf-toc*
DESCRIPTION |editqf-description|
USAGE |editqf-usage|
CUSTOMIZATION |editqf-customization|
INSTALLATION |editqf-installation|
KNOWN ISSUE |editqf-issues|
CHANGELOG |editqf-changelog|
==============================================================================
DESCRIPTION *editqf-description*
This script is a reimplementation and continuation of the QuickFixNotes script
(http://www.vim.org/scripts/script.php?script_id=2216). Besides the original
functionality of capturing notes and storing them in a file, this script
provides commands for easily loading the stored data, also for location lists.
Though the main functionality of this script is to make editing of quickfix
entries easy.
I did a screencast giving an overview of the basic functionality of this
plugin. It's available at vimeo: http://vimeo.com/jceb/editqf
This script can be downloaded from
http://www.vim.org/scripts/script.php?script_id=3557. The latest development
version is available at https://github.com/jceb/vim-editqf.
==============================================================================
USAGE *editqf-usage*
Create entries in the quickfix list by either running special a command like
:make or :grep or add a note by pressing <leader>n. Then bring up the quickfix
window by running the command :cw.
When you are in the quickfix window navigate to the entry you want to change.
Just press any key that would bring in into insert mode or change the text like
"i". Automatically a new window will be opened containing all entries of the
quickfix window.
You can use the regular editing commands for editing the entries. Once you're
done, just save the buffer and leave or close the window. I recommend using :x,
because this command does both with just one command. After that you are
brought back to the error you initially started editing in the quickfix window.
For changing the type of a quickfix entry from within the quickfix window five
convenience shortcuts are provided:
- I -> info
- W -> warning
- E -> error
- << and >> -> cycle through the different types
Additionally the plugin provides the following commands that support
storing and restoring quickfix and location lists:
:QFSave <FILENAME>
:QFLoad <FILENAME> " default is to append to the current quickfix list
:QFLoad! <FILENAME> " replace quickfix list with the contents of file
:QFAddNote [NOTE] " add quickfix entry with message NOTE
:QFAddNote! [NOTE] " like :QFAddNote but start a new quickfix list
:QFAddNotePattern[!] [NOTE] " add quickfix entry matching the pattern
" of the current line
:LocSave <FILENAME>
:LocLoad <FILENAME> " default is to append to the current location list
:LocLoad! <FILENAME> " replace location list with the contents of file
:LocAddNote [NOTE] " add location entry with message NOTE
:LocAddNote! [NOTE] " like :LocAddNote but start a new location list
:LocAddNotePattern[!] [NOTE] " add location entry matching the pattern
" of the current line
Editqf has integrated support for the hier script
(http://www.vim.org/scripts/script.php?script_id=3564) which highlights
quickfix errors to make them more visible.
==============================================================================
CUSTOMIZATION *editqf-customization*
The default filename for storing and loading quickfix and location lists is
customizable by setting the following variables in your vimrc:
let g:editqf_saveqf_filename = "quickfix.list"
let g:editqf_saveloc_filename = "location.list"
Jump to the edited error when editing finished:
let g:editqf_jump_to_error = 1
Store absolute filename when adding a new note
let g:editqf_store_absolute_filename = 1
The default keybinding <leader>n for adding a quickfix note can be
customized by defining a mapping in your vimrc:
nmap <leader>n <Plug>QFAddNote
nmap <leader>N <Plug>QFAddNotePattern
nmap <leader>l <Plug>LocAddNote
nmap <leader>L <Plug>LocAddNotePattern
The above mappings can be turned off by setting:
let g:editqf_no_mappings = 1
The mappings to change the type of quickfix entry can be turned off by
setting:
let g:editqf_no_type_mappings = 1
==============================================================================
INSTALLATION *editqf-installation*
1. Download editqf.vba
2. Open file in vim and run :so % to install plugin
3. Restart vim
==============================================================================
KNOWN ISSUES *editqf-issues*
- If the file that the cursor is on in the quickfix window, before entering the
edit mode, changes after editing, |:x| shouldn't be used to save and exit
edit mode. This will break the quickfix window by opening the file with the
current error in the quickfix window. Instead |:w| followed by a cursor
movement to a different window should be used.
- When trying to edit a location list the quickfix list is opened instead!
This is because it's not possible to tell the difference between a quickfix
and a location list from vim script. A workaround is to open the location
list manually: :e loc:list
- When opening a location list (filename loc:list) in a new window the location
list of that window is opened instead! Location lists should always be edited
by running :e loc:list. Once editing finished C-^ should be used to leave the
location list and go back to the last edited buffer
==============================================================================
CHANGELOG *editqf-changelog*
1.6 (not released yet)
- Add editqf_no_type_mappings to disable "types"
- make temporary filename more unlikely to be a local file
1.5
- preserve cursor position when saving qf or location list
- remove redundant code to format lists
- remove workaround with an empty line number or search pattern
- don't suppress error messages anymore
1.4
- add << and >> to cycle through quickfix types
- move logic to an autoload plugin
- fix timeouts for <Plug>s
- minor fixes
1.3
- add convenience shortcuts for changing the type of a quickfix entry (info,
warning or error)
- fix change of note type from error to info
1.2
- fix issue when editing entries without a type by setting the default type to
error
- make commands overwrite commands with the same name
- clear autocommand groups at definition time
- change note type from error to info
1.1
- add support for hier script for highlighting quickfix and location entries
- add variable g:editqf_jump_to_error to make jumping to the last selected
error optional
- add variable g:editqf_store_absolute_filename to let the user decide whether
filenames are stored with an absolute or relative path
- prefix global variables with the plugin's name
- move all functionality from Edit to Read function to allow editing of qf:list
and loc:list directly through vim commands (:e, :sp ...)
- add support for patterns matching
- add description of quickfix/location fields to the editing buffer
- allow deleting all entries from quickfix/location list
- change command and <Plug> names to start with prefix QF or Loc
- general refactoring and cleanup
1.0
- initial release
vim:tw=78:ts=8:ft=help:norl: