-
Notifications
You must be signed in to change notification settings - Fork 1
Make quickfix entries editable
jceb/vim-editqf
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
*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:
About
Make quickfix entries editable
Resources
Stars
Watchers
Forks
Packages 0
No packages published