{"id":13898257,"url":"https://github.com/bfrg/vim-qf-history","last_synced_at":"2025-04-09T19:24:09.326Z","repository":{"id":50271375,"uuid":"241964235","full_name":"bfrg/vim-qf-history","owner":"bfrg","description":"Navigate Vim's quickfix and location-list history using a popup menu","archived":false,"fork":false,"pushed_at":"2024-02-02T22:07:11.000Z","size":48,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T21:22:46.989Z","etag":null,"topics":["vim","vim-plugin","vim-qf","vim9script"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bfrg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-20T18:52:12.000Z","updated_at":"2025-03-14T01:42:50.000Z","dependencies_parsed_at":"2024-10-30T16:13:00.541Z","dependency_job_id":"6717836c-369b-43b2-b48e-24a78f7b30de","html_url":"https://github.com/bfrg/vim-qf-history","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-qf-history","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-qf-history/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-qf-history/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-qf-history/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfrg","download_url":"https://codeload.github.com/bfrg/vim-qf-history/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248096277,"owners_count":21047014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vim","vim-plugin","vim-qf","vim9script"],"created_at":"2024-08-06T18:04:11.573Z","updated_at":"2025-04-09T19:24:09.275Z","avatar_url":"https://github.com/bfrg.png","language":"Vim Script","funding_links":[],"categories":["Vim Script","Quickfix"],"sub_categories":[],"readme":"# vim-qf-history\n\nQuickly navigate Vim's `quickfix` and `location-list` history using a popup\nmenu.\n\n\u003cdl\u003e\n  \u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/6266600/75272505-581fa500-57fe-11ea-844d-9e0f6dc334a6.png\" width=\"480\"/\u003e\n  \u003c/p\u003e\n\u003c/dl\u003e\n\n**Background**\n\nVim remembers the ten last used quickfix lists, and the ten last used\nlocation-lists for each window. The entire quickfix and location-list stack can\nbe displayed with `:chistory` and `:lhistory`, respectively. Older quickfix\nlists are accessed through `:colder` and `:cnewer`, or directly with\n`:[count]chistory` (and similar for location-lists). See `:help\nquickfix-error-lists` for more details.\n\nThis plugin will display the quickfix and location-list stack in a popup menu\nallowing the user to easily switch to an earlier error list. If one of the lists\ncontains different error types, the total number of each error type (E, W, I, N)\nis shown along with the total number of entries. Unknown error types are\ndisplayed in column \"?\", and empty lists are greyed out.\n\n\n## Usage\n\n### Commands\n\n- **`:Chistory`** - Display the quickfix history in a popup window and make the\n  selected list the current list, similar to `:[count]chistory`.\n- **`:Lhistory`** - Same as above, but display the location-list history of the\n  current window, similar to `:[count]lhistory`.\n\nWhen switching the quickfix or location list through the popup menu, the plugin\nwill execute the `QuickFixCmdPost` event with the pattern `chistory` and\n`lhistory`, respectively.\n\n### Popup mappings\n\n| Key                                           | Description                                                         |\n| --------------------------------------------- | ------------------------------------------------------------------- |\n| \u003ckbd\u003ej\u003c/kbd\u003e, \u003ckbd\u003eDown\u003c/kbd\u003e, \u003ckbd\u003eTab\u003c/kbd\u003e | Move cursorline down one line.                                      |\n| \u003ckbd\u003ek\u003c/kbd\u003e, \u003ckbd\u003eup\u003c/kbd\u003e, \u003ckbd\u003eS-Tab\u003c/kbd\u003e | Move cursorline up one line.                                        |\n| \u003ckbd\u003eg\u003c/kbd\u003e                                  | Move cursorline to top.                                             |\n| \u003ckbd\u003eG\u003c/kbd\u003e                                  | Move cursorline to bottom.                                          |\n| \u003ckbd\u003eq\u003c/kbd\u003e                                  | Close the popup menu.                                               |\n| \u003ckbd\u003e0\u003c/kbd\u003e - \u003ckbd\u003e9\u003c/kbd\u003e                   | Make the respective error list the current list.                    |\n| \u003ckbd\u003eEnter\u003c/kbd\u003e                              | Accept current selection. Makes the selected list the current list. |\n\n**Note:** Pressing \u003ckbd\u003e0\u003c/kbd\u003e to \u003ckbd\u003e9\u003c/kbd\u003e will select and automatically\nclose the popup window. \u003ckbd\u003e0\u003c/kbd\u003e will select the 10th error list, or the\nlast one in the stack (most recent one) if there are less than ten lists.\n\n### Examples\n\n1. Open quickfix and location-list history with\n   \u003ckbd\u003eLeader\u003c/kbd\u003e+\u003ckbd\u003ec\u003c/kbd\u003e+\u003ckbd\u003eh\u003c/kbd\u003e and\n   \u003ckbd\u003eLeader\u003c/kbd\u003e+\u003ckbd\u003el\u003c/kbd\u003e+\u003ckbd\u003eh\u003c/kbd\u003e, respectively:\n   ```vim\n   nnoremap \u003cLeader\u003ech \u003cCmd\u003eChistory\u003cCr\u003e\n   nnoremap \u003cLeader\u003elh \u003cCmd\u003eLhistory\u003cCr\u003e\n   ```\n\n2. Alternatively, if you're not using the default `Select-mode` mappings\n   (mnemonic: go history):\n   ```vim\n   nnoremap gh \u003cCmd\u003eChistory\u003cCr\u003e\n   nnoremap gH \u003cCmd\u003eLhistory\u003cCr\u003e\n   ```\n3. Print a short info of the selected list in the command-line after switching\n   lists:\n   ```vim\n   augroup qf-history\n       autocmd!\n       autocmd QuickFixCmdPost chistory echo printf('Quickfix %d of %d (%d items): %s',\n           \\ getqflist({nr: 0}).nr,\n           \\ getqflist({nr: '$'}).nr,\n           \\ getqflist({size: 0}).size,\n           \\ getqflist({title: 0}).title\n           \\ )\n       autocmd QuickFixCmdPost lhistory echo printf('Location-list %d of %d (%d items): %s',\n           \\ getloclist(0, {nr: 0}).nr,\n           \\ getloclist(0, {nr: '$'}).nr,\n           \\ getloclist(0, {size: 0}).size,\n           \\ getloclist(0, {title: 0}).title\n           \\ )\n   augroup END\n   ```\n4. Automatically open the quickfix or location-list window after selecting a\n   list in the popup menu:\n   ```vim\n   augroup qf-history\n       autocmd!\n       autocmd QuickFixCmdPost chistory cwindow\n       autocmd QuickFixCmdPost lhistory lwindow\n   augroup END\n   ```\n\n\n## Configuration\n\n### `g:qfhistory`\n\nThe appearance of the popup window can be configured through the dictionary\n`g:qfhistory`. The following entries are supported:\n\n| Entry             | Description                                                         | Default                                    |\n| ----------------- | ------------------------------------------------------------------- | ------------------------------------------ |\n| `title`           | Whether to show a popup window title (`0` or `1`).                  | `true`                                     |\n| `padding`         | List with numbers defining the padding inside the popup window.     | `[1, 1, 1, 1]`                             |\n| `border`          | List with numbers (`0` or `1`) specifying whether to draw a border. | `[1, 1, 1, 1]`                             |\n| `borderchars`     | List with characters used for drawing the window border.            | `['─', '│', '─', '│', '┌', '┐', '┘', '└']` |\n| `borderhighlight` | List with highlight group names used for drawing the border.        | `['QfHistory']`                            |\n\n**Note:** when only one `borderchars` or `borderhighlight` item is specified, it\nis used on all sides.\n\n### Highlighting\n\nThe highlighting of the popup window can be changed through the following\nhighlight groups:\n\n| Highlight group     | Description                               | Default   |\n| ------------------- | ----------------------------------------- | --------- |\n| `QfHistory`         | Popup window background and normal text.  | `Pmenu`   |\n| `QfHistoryHeader`   | Top line of the quickfix-history list.    | `Title`   |\n| `QfHistoryCurrent`  | Character marking the current error list. | `Title`   |\n| `QfHistoryEmpty`    | Empty error list.                         | `Comment` |\n\n### Examples\n\n![img][image-examples]\n\n**Left:** no window border and no window title:\n```vim\ng:qfhistory = {border: [0, 0, 0, 0], title: false}\n```\n\n**Center:** border with round corners, padding on left and right side:\n```vim\ng:qfhistory = {\n    padding: [0, 1, 0, 1],\n    borderchars: ['─', '│', '─', '│', '╭', '╮', '╯', '╰'],\n    borderhighlight: ['MyBoldPopupBorder']\n}\n```\n\n**Right:** same as middle image but without a window title\n```vim\ng:qfhistory = {\n    title: false,\n    padding: [0, 1, 0, 1],\n    borderchars: ['─', '│', '─', '│', '╭', '╮', '╯', '╰'],\n    borderhighlight: ['MyBoldPopupBorder']\n}\n```\n\n\n## Installation\n\nRun the following commands in your terminal:\n```bash\n$ cd ~/.vim/pack/git-plugins/start\n$ git clone https://github.com/bfrg/vim-qf-history\n$ vim -u NONE -c 'helptags vim-qf-history/doc | quit'\n```\n**Note:** The directory name `git-plugins` is arbitrary, you can pick any other\nname. For more details see `:help packages`. Alternatively, use your favorite\nplugin manager.\n\n\n## Credits\n\nThis plugin was inspired by the Vimways article [Colder quickfix lists][vimways]\nwritten by [Nick Jensen][nickspoons].\n\n\n## License\n\nDistributed under the same terms as Vim itself. See `:help license`.\n\n[vimways]: https://vimways.org/2018/colder-quickfix-lists\n[nickspoons]: https://github.com/nickspoons\n[image-examples]: https://user-images.githubusercontent.com/6266600/74968239-cb01d800-541a-11ea-87f6-cb6ba9829395.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfrg%2Fvim-qf-history","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfrg%2Fvim-qf-history","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfrg%2Fvim-qf-history/lists"}