|
| 1 | +*qf.txt* A plugin to make working with the quickfix list/window smoother. |
| 2 | + |
| 3 | + |
| 4 | + VIM-QF DOCUMENTATION by Romain Lafourcade |
| 5 | + |
| 6 | + |
| 7 | +Help on using vim-qf *qf* *vim-qf* |
| 8 | + |
| 9 | + 1. Introduction ............................... |qf-intro| |
| 10 | + 2. Installation ............................... |qf-installation| |
| 11 | + 3. Configuration .............................. |qf-configuration| |
| 12 | + 4. Usage ...................................... |qf-usage| |
| 13 | + 5. Aknowledgements ............................ |qf-aknowledgements| |
| 14 | + 6. TODO ....................................... |qf-todo| |
| 15 | + 7. DONE ....................................... |qf-done| |
| 16 | + |
| 17 | +============================================================================== |
| 18 | + 1. INTRODUCTION *qf-intro* |
| 19 | + |
| 20 | +vim-qf – short for "vim-quickfix" – is a small collection of settings, |
| 21 | +commands and mappings put together to make working with the quickfix |
| 22 | +list/window smoother. |
| 23 | + |
| 24 | +Here is a list of the features provided by this plugin: |
| 25 | + |
| 26 | + - no soft-wrapping, |
| 27 | + - no relative numbers, |
| 28 | + - quickfix buffers hidden from |:ls| and buffer navigation, |
| 29 | + - Ack.vim-inspired mappings, |
| 30 | + - wrapping mappings for |:cnext|, |:cprevious|, |:lnext|, |:lprevious|, |
| 31 | + - jump to and from the location/quickfix window with a single mapping |
| 32 | + - filter/restore the list |
| 33 | + - perform commands on each line in the list |
| 34 | + - perform commands on each file in the list |
| 35 | + - open the location/quickfix window automatically after |:make|, |:grep|, |
| 36 | + |:lvimgrep| and friends if there are valid locations/errors |
| 37 | + - quit Vim if the last window is a location/quickfix window |
| 38 | + |
| 39 | +============================================================================== |
| 40 | + 2. INSTALLATION *qf-installation* |
| 41 | + |
| 42 | +Use your favorite plugin manager or dump the files below in their |
| 43 | +standard location: |
| 44 | + |
| 45 | +on Unix-like systems... > |
| 46 | +
|
| 47 | + ~/.vim/after/ftplugin/qf.vim |
| 48 | + ~/.vim/autoload/qf.vim |
| 49 | + ~/.vim/doc/qf.txt |
| 50 | + ~/.vim/plugin/qf.vim |
| 51 | +< |
| 52 | +on Windows... > |
| 53 | +
|
| 54 | + %userprofile%\vimfiles\after\ftplugin\qf.vim |
| 55 | + %userprofile%\vimfiles\autoload\qf.vim |
| 56 | + %userprofile%\vimfiles\doc\qf.txt |
| 57 | + %userprofile%\vimfiles\plugin\qf.vim |
| 58 | +< |
| 59 | +Don't forget to execute the following command to make the documentation |
| 60 | +globally available: > |
| 61 | +
|
| 62 | + :helptags /path/to/doc/ |
| 63 | +< |
| 64 | +============================================================================== |
| 65 | + 3. CONFIGURATION *qf-configuration* |
| 66 | + |
| 67 | +Available mappings: |
| 68 | + |
| 69 | + <Plug>QfCprevious ............................. |QfCprevious| |
| 70 | + <Plug>QfCnext ................................. |QfCnext| |
| 71 | + <Plug>QfLprevious ............................. |QfLprevious| |
| 72 | + <Plug>QfLnext ................................. |QfLnext| |
| 73 | + <Plug>QfSwitch ................................ |QfSwitch| |
| 74 | + |
| 75 | +Available options: |
| 76 | + |
| 77 | + qf_mapping_ack_style .......................... |qf_mapping_ack_style| |
| 78 | + qf_statusline ................................. |qf_statusline| |
| 79 | + |
| 80 | +------------------------------------------------------------------------------ |
| 81 | + *QfCprevious* |
| 82 | + *QfCnext* |
| 83 | +Go up and down the quickfix list and wrap around. |
| 84 | + |
| 85 | +Example: > |
| 86 | +
|
| 87 | + nnoremap <Home> <Plug>QfCprevious |
| 88 | + nnoremap <End> <Plug>QfCnext |
| 89 | +< |
| 90 | +------------------------------------------------------------------------------ |
| 91 | + *QfLprevious* |
| 92 | + *QfLnext* |
| 93 | +Go up and down the location list and wrap around. |
| 94 | + |
| 95 | +Example: > |
| 96 | +
|
| 97 | + nnoremap <C-Home> <Plug>QfLprevious |
| 98 | + nnoremap <C-End> <Plug>QfLnext |
| 99 | +< |
| 100 | +------------------------------------------------------------------------------ |
| 101 | + *QfSwitch* |
| 102 | +Jump to and from the location/quickfix window. |
| 103 | + |
| 104 | +Example: > |
| 105 | +
|
| 106 | + <Plug>QfSwitch |
| 107 | +< |
| 108 | +------------------------------------------------------------------------------ |
| 109 | + *'qf_mapping_ack_style'* |
| 110 | +Value: numeric ~ |
| 111 | +Default: 0 ~ |
| 112 | + |
| 113 | +Ack.vim-inspired mappings available only in the quickfix window: |
| 114 | + |
| 115 | + s - open entry in a new horizontal window |
| 116 | + v - open entry in a new vertical window. |
| 117 | + t - open entry in a new tab. |
| 118 | + o - open entry and come back |
| 119 | + O - open entry and close the location/quickfix window. |
| 120 | + |
| 121 | +Add the line below to your vimrc to enable that feature: > |
| 122 | +
|
| 123 | + let g:qf_mapping_ack_style = 1 |
| 124 | +< |
| 125 | +------------------------------------------------------------------------------ |
| 126 | + *'qf_statusline'* |
| 127 | +Value: dictionary ~ |
| 128 | +Default: {} ~ |
| 129 | + |
| 130 | +It is possible to define what comes before and after the default information |
| 131 | +displayed in the |'statusline'|. |
| 132 | + |
| 133 | +Example: > |
| 134 | +
|
| 135 | + let g:qf_statusline = {} |
| 136 | + let g:qf_statusline.before = '%<\ ' |
| 137 | + let g:qf_statusline.after = '\ %f%=%l\/%-6L\ \ \ \ \ ' |
| 138 | +< |
| 139 | +============================================================================== |
| 140 | + 4. USAGE *qf-usage* |
| 141 | + |
| 142 | +The following commands are available when the location/quickfix window |
| 143 | +is focused: |
| 144 | + |
| 145 | +*:Filter* |
| 146 | + |
| 147 | + Removes every item that doesn't match with the supplied argument, |
| 148 | + either in the filename or in the description. |
| 149 | + |
| 150 | + Example: > |
| 151 | +
|
| 152 | + :Filter model |
| 153 | +> |
| 154 | +*:Restore* |
| 155 | + |
| 156 | + Restores the list to its original state. |
| 157 | + |
| 158 | +*:Doline* |
| 159 | + |
| 160 | + Executes an Ex command on every line in the current list. |
| 161 | + |
| 162 | + Example: > |
| 163 | +
|
| 164 | + :Doline s/^/-- |
| 165 | +< |
| 166 | +*:Dofile* |
| 167 | + |
| 168 | + Executes an Ex command on every file in the current list. |
| 169 | + |
| 170 | + Example: > |
| 171 | +
|
| 172 | + :Dofile norm @q |
| 173 | +< |
| 174 | +============================================================================== |
| 175 | + 5. AKNOWLEGEMENTS *qf-aknowledgements* |
| 176 | + |
| 177 | +The "Ack.vim-inspired mappings" are adapted from Ack.vim: |
| 178 | + |
| 179 | + - https://github.com/mileszs/ack.vim |
| 180 | + |
| 181 | +|:Doline| and |:Dofile| are inspired by these online resources: |
| 182 | + |
| 183 | + - http://vimcasts.org/episodes/project-wide-find-and-replace/ |
| 184 | + - https://github.com/nelstrom/vim-qargs |
| 185 | + - https://github.com/henrik/vim-qargs |
| 186 | + - http://stackoverflow.com/a/4793316/546861 |
| 187 | + - http://stackoverflow.com/a/5686810/546861 |
| 188 | + |
| 189 | +|:Filter| is adapted from the answers in this thread: |
| 190 | + |
| 191 | + - http://stackoverflow.com/q/15406138/546861 |
| 192 | + |
| 193 | +============================================================================== |
| 194 | + 6. TODO *qf-todo* |
| 195 | + |
| 196 | + - Ask #vim's opinion. |
| 197 | + - Export more options? |
| 198 | + - Add a gifcast to the README? |
| 199 | + |
| 200 | +============================================================================== |
| 201 | + 7. DONE *qf-done* |
| 202 | + |
| 203 | + - Use <Plug> mappings. |
| 204 | + - Add proper attribution for a few features. |
| 205 | + - Write a proper help file. |
| 206 | + |
| 207 | + vim:tw=78:ts=8:ft=help:norl: |
0 commit comments