Mercurial > vim-gutentags
comparison doc/gutentags.txt @ 202:b50b6d0f82dd
Refactor for Vim8/Neovim job support.
- Refactor all modules' `generate` methods to use a vaguely generic job API
wrapper that works for both Vim8 and Neovim jobs.
- Make the `statusline` method use new `User` autocommands driven by the
job-started/ended callbacks.
- Remove all the lock-file-related stuff.
- Better error/warning messages.
- Move a few things around.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 31 Mar 2018 18:42:54 -0700 |
parents | 22cd3334cf43 |
children | 30ac3583c902 |
comparison
equal
deleted
inserted
replaced
201:b41385032f86 | 202:b50b6d0f82dd |
---|---|
170 troubleshoot a problem. | 170 troubleshoot a problem. |
171 In addition to messages in Vim, it will also make | 171 In addition to messages in Vim, it will also make |
172 Gutentags redirect the output of the tag generation | 172 Gutentags redirect the output of the tag generation |
173 script to a `.log` file in the project root. | 173 script to a `.log` file in the project root. |
174 | 174 |
175 *:GutentagsUnlock* | |
176 :GutentagsUnlock | |
177 Gutentags uses a `.lock` file to know when tag | |
178 generation is running. If something goes wrong with | |
179 that process, that lock file could be left behind. You | |
180 could just remove it manually from the root of your | |
181 project, but you can also run |:GutentagsUnlock| so | |
182 that Vim does it for you. | |
183 If you find that you need to use this more than a | |
184 couple times ever, there's probably a bug with | |
185 Gutentags, or something otherwise wrong or unexpected | |
186 with your system. Please file a bug. | |
187 | |
188 | 175 |
189 Gutentags also has some user auto-commands (see |User| and |:doautocmd|): | 176 Gutentags also has some user auto-commands (see |User| and |:doautocmd|): |
177 | |
178 *GutentagsUpdating* | |
179 GutentagsUpdating | |
180 This auto-command is triggered when a background | |
181 update job has started. | |
190 | 182 |
191 *GutentagsUpdated* | 183 *GutentagsUpdated* |
192 GutentagsUpdated | 184 GutentagsUpdated |
193 This auto-command is triggered when a background | 185 This auto-command is triggered when a background |
194 update job has been started. | 186 update job has finished. |
195 | 187 |
196 | 188 |
197 ============================================================================= | 189 ============================================================================= |
198 3. Status Line *gutentags-status-line* | 190 3. Status Line *gutentags-status-line* |
199 | 191 |
204 *gutentags#statusline()* | 196 *gutentags#statusline()* |
205 You can display and indicator of tag generation progress in your |status-line| | 197 You can display and indicator of tag generation progress in your |status-line| |
206 with the following function: > | 198 with the following function: > |
207 :set statusline+=%{gutentags#statusline()} | 199 :set statusline+=%{gutentags#statusline()} |
208 | 200 |
209 This won't print anything unless Gutentags figures that `ctags` is running in | 201 Because Gutentags runs the tag generation in the background, the statusline |
210 the background. This is done by checking a `.lock` file next to the tag file, | 202 indicator might stay there even after the background process has ended. It |
211 but there's also some optimization before that to not slow down Vim. Note that | 203 would only go away when Vim decides to refresh the statusline. You can force |
212 the `.lock` file can sometimes be left around incorrectly by the background | 204 refresh it in a callback on |GutentagsUpdating| and |GutentagsUpdated|. |
213 process, and you may need to clean it up. See |:GutentagsUnlock|. | 205 |
214 | 206 For instance, with the `lightline` plugin: |
215 When Gutentags thinks `ctags` is still running, it will print the string | 207 |
216 "TAGS" by default. You can customize it: > | 208 augroup MyGutentagsStatusLineRefresher |
217 :set statusline+=%{gutentags#statusline('[Generating...]')} | 209 autocmd! |
218 | 210 autocmd User GutentagsUpdating call lightline#update() |
219 This will print the string "[Generating...]" when tags are being generated. | 211 autocmd User GutentagsUpdated call lightline#update() |
212 augroup END | |
220 | 213 |
221 | 214 |
222 ============================================================================= | 215 ============================================================================= |
223 4. Global Settings *gutentags-settings* | 216 4. Global Settings *gutentags-settings* |
224 | 217 |