{"id":13850469,"url":"https://github.com/bfrg/vim-qf-preview","last_synced_at":"2025-04-09T19:24:05.214Z","repository":{"id":48539128,"uuid":"206033899","full_name":"bfrg/vim-qf-preview","owner":"bfrg","description":"Preview the quickfix item under the cursor in a popup window","archived":false,"fork":false,"pushed_at":"2024-02-02T22:04:03.000Z","size":84,"stargazers_count":55,"open_issues_count":1,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-23T21:22:47.399Z","etag":null,"topics":["vim","vim-ftplugin","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":"2019-09-03T08:59:02.000Z","updated_at":"2025-03-14T01:42:48.000Z","dependencies_parsed_at":"2024-01-13T17:13:06.168Z","dependency_job_id":"3c22ec74-cf6e-4ec5-9efb-976b178b69b3","html_url":"https://github.com/bfrg/vim-qf-preview","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-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-qf-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-qf-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-qf-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfrg","download_url":"https://codeload.github.com/bfrg/vim-qf-preview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248096236,"owners_count":21047008,"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-ftplugin","vim-plugin","vim-qf","vim9script"],"created_at":"2024-08-04T20:01:13.555Z","updated_at":"2025-04-09T19:24:05.194Z","avatar_url":"https://github.com/bfrg.png","language":"Vim Script","funding_links":[],"categories":["Vim script","Vim Script","Quickfix"],"sub_categories":[],"readme":"# vim-qf-preview\n\nA plugin for the quickfix and location list window to quickly preview the file\nunder the cursor at the current quickfix location in a popup window.\n\n\u003cdl\u003e\n  \u003cp align=\"center\"\u003e\n  \u003ca href=\"https://asciinema.org/a/265817\"\u003e\n    \u003cimg src=\"https://asciinema.org/a/265817.png\" width=\"480\"\u003e\n  \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/dl\u003e\n\n\n## Usage\n\n### Quickfix window mapping\n\nTo avoid conflicts with other plugins no default key mapping for opening the\npopup window is provided. You will first have to bind `\u003cplug\u003e(qf-preview-open)`\nto a key-sequence of your choice.\n\nFor example, to open the popup window with \u003ckbd\u003ep\u003c/kbd\u003e, add the following to\n`~/.vim/after/ftplugin/qf.vim`:\n```vim\nnmap \u003cbuffer\u003e p \u003cplug\u003e(qf-preview-open)\n```\n\nOr alternatively, if you prefer to keep your plugin settings in your `vimrc`:\n```vim\naugroup qfpreview\n    autocmd!\n    autocmd FileType qf nmap \u003cbuffer\u003e p \u003cplug\u003e(qf-preview-open)\naugroup END\n```\n\nIn the quickfix window navigate the cursor to the desired error and press\n\u003ckbd\u003ep\u003c/kbd\u003e to preview the file at the current quickfix location in a popup\nwindow. The window is scrolled such that the buffer line with the error is at\nthe top of the popup window.\n\n### Popup window mappings\n\nThe following default popup mappings are provided:\n\n- Scroll up/down one text line: \u003ckbd\u003eCtrl-k\u003c/kbd\u003e, \u003ckbd\u003eCtrl-j\u003c/kbd\u003e\n- Scroll to first/last line of displayed buffer: \u003ckbd\u003eShift-Home\u003c/kbd\u003e,\n  \u003ckbd\u003eShift-End\u003c/kbd\u003e\n- Scroll back to error line (\"reset\"): \u003ckbd\u003er\u003c/kbd\u003e\n- Close the popup window: \u003ckbd\u003eq\u003c/kbd\u003e, \u003ckbd\u003eCtrl-c\u003c/kbd\u003e\n\n\n## Configuration\n\n### b:qfpreview and g:qfpreview\n\nThe default popup key mappings and the appearance of the popup window can be\nconfigured through the variable `b:qfpreview` in `after/ftplugin/qf.vim`, or\nalternatively through the global variable `g:qfpreview`. The variable must be a\ndictionary containing any of the following entries:\n\n| Entry          | Description                                                | Default                 |\n| -------------- | ---------------------------------------------------------- | ----------------------- |\n| `top`          | Scroll to the first line of the buffer.                    | `\"\\\u003cS-Home\u003e\"`           |\n| `bottom`       | Scroll to the bottom of the buffer.                        | `\"\\\u003cS-End\u003e\"`            |\n| `scrollup`     | Scroll window up one text line.                            | `\"\\\u003cC-k\u003e\"`              |\n| `scrolldown`   | Scroll window down one text line.                          | `\"\\\u003cC-j\u003e\"`              |\n| `halfpageup`   | Scroll window up one half page.                            | none                    |\n| `halfpagedown` | Scroll window down one half page.                          | none                    |\n| `fullpageup`   | Scroll window up one full page.                            | none                    |\n| `fullpagedown` | Scroll window down one full page.                          | none                    |\n| `reset`        | Scroll window back to error line.                          | `\"r\"`                   |\n| `close`        | Close the popup window.                                    | `\"q\"`                   |\n| `next`         | Navigate to next quickfix item in current list.            | none                    |\n| `previous`     | Navigate to previous quickfix item in current list.        | none                    |\n| `height`       | Number of text lines to display in the popup window.       | `15`                    |\n| `offset`       | Number of buffer lines to show above the error line.       | `3`                     |\n| `number`       | Enable the `'number'` column in the popup window.          | `false`                 |\n| `sign`         | Place a `sign` on the error line in the displayed buffer.¹ | `{linehl: 'CursorLine'}`|\n| `matchcolumn`  | Highlight column of current quickfix item in popup window. | `true`                  |\n\n¹For valid `sign` attributes see \u003ckbd\u003e:help qfpreview.sign\u003c/kbd\u003e and the\n[examples](#examples) below.\n\n### Highlighting\n\nThe highlighting of the popup window can be configured through the highlighting\ngroups `QfPreview`, `QfPreviewTitle`, `QfPreviewScrollbar`, `QfPreviewThumb` and\n`QfPreviewColumn`. See \u003ckbd\u003e:help qfpreview-highlight\u003c/kbd\u003e for more details.\n\n### Examples\n\n1. Override the popup scrolling keys:\n   ```vim\n   vim9script\n   g:qfpreview = {\n       top: 'g',\n       bottom: 'G',\n       scrollup: 'k',\n       scrolldown: 'j',\n       halfpageup: 'u',\n       halfpagedown: 'd',\n       fullpageup: 'b',\n       fullpagedown: 'f',\n       next: 'n',\n       previous: 'p'\n   }\n   ```\n2. Instead of displaying a cursorline, display a sign in the `'signcolumn'`:\n   ```vim\n   g:qfpreview = {\n       sign: {\n           text: '\u003e\u003e',\n           texthl: 'Search'\n       }\n   }\n   ```\n3. Same as 2., but also enable the `'number'` column. In this case the placed\n   sign is shown in the `'number'` column:\n   ```vim\n   g:qfpreview = {\n       number: true,\n       sign: {\n           text: '\u003e\u003e',\n           texthl: 'Search'\n       }\n   }\n   ```\n\nScreenshots of default configuration, 2. and 3.:\n![out](https://user-images.githubusercontent.com/6266600/77472775-b4cdaa00-6e14-11ea-8abd-d55c47fdeda7.png)\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-preview\n$ vim -u NONE -c 'helptags vim-qf-preview/doc | quit'\n```\n**Note:** The directory name `git-plugins` is arbitrary, you can pick any other\nname. For more details see \u003ckbd\u003e:help packages\u003c/kbd\u003e. Alternatively, use your\nfavorite plugin manager.\n\n\n## License\n\nDistributed under the same terms as Vim itself. See \u003ckbd\u003e:help license\u003c/kbd\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfrg%2Fvim-qf-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfrg%2Fvim-qf-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfrg%2Fvim-qf-preview/lists"}