{"id":13410910,"url":"https://github.com/gennaro-tedesco/nvim-peekup","last_synced_at":"2025-04-09T09:08:25.852Z","repository":{"id":52148775,"uuid":"337594729","full_name":"gennaro-tedesco/nvim-peekup","owner":"gennaro-tedesco","description":"👀 dynamically interact with vim registers","archived":false,"fork":false,"pushed_at":"2023-02-23T13:32:16.000Z","size":10739,"stargazers_count":307,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T16:23:55.976Z","etag":null,"topics":["lua","neovim"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gennaro-tedesco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-02-10T02:25:23.000Z","updated_at":"2025-03-25T08:05:54.000Z","dependencies_parsed_at":"2024-01-03T03:29:25.617Z","dependency_job_id":"68d27648-4a59-4410-90ff-dc67b025a8e4","html_url":"https://github.com/gennaro-tedesco/nvim-peekup","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gennaro-tedesco%2Fnvim-peekup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gennaro-tedesco%2Fnvim-peekup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gennaro-tedesco%2Fnvim-peekup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gennaro-tedesco%2Fnvim-peekup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gennaro-tedesco","download_url":"https://codeload.github.com/gennaro-tedesco/nvim-peekup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008630,"owners_count":21032556,"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":["lua","neovim"],"created_at":"2024-07-30T20:01:10.158Z","updated_at":"2025-04-09T09:08:25.837Z","avatar_url":"https://github.com/gennaro-tedesco.png","language":"Lua","funding_links":[],"categories":["Register","Lua"],"sub_categories":["Markdown and LaTeX","Assembly"],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg width=\"300\" height=\"300\" src=\"https://user-images.githubusercontent.com/15387611/189754366-359af924-48c8-4f58-8d21-589d5e5c2276.png\"\u003e\n  \u003cbr\u003e\n  nvim-peekup\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch2 align=\"center\"\u003e\n  \u003ca href=\"https://luarocks.org/modules/gennaro-tedesco/nvim-peekup\"\u003e\n    \u003cimg alt=\"luarocks\" src=\"https://img.shields.io/luarocks/v/gennaro-tedesco/nvim-peekup?logo=lua\u0026color=2aa198\u0026style=for-the-badge\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/gennaro-tedesco/nvim-peekup/releases\"\u003e\n    \u003cimg alt=\"releases\" src=\"https://img.shields.io/github/release/gennaro-tedesco/nvim-peekup?logo=neovim\u0026color=2aa198\u0026style=for-the-badge\"/\u003e\n  \u003c/a\u003e\n\u003c/h2\u003e\n\n\u003ch4 align=\"center\"\u003eneovim registers made easy!\u003c/h4\u003e\n\n\u003ch3 align=\"center\"\u003e\n  \u003ca href=\"#Installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#Usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#Features-in-short\"\u003eFeatures in short\u003c/a\u003e •\n  \u003ca href=\"#Customisation\"\u003eCustomisation\u003c/a\u003e •\n  \u003ca href=\"#Feedback\"\u003eFeedback\u003c/a\u003e\n\u003c/h3\u003e\n\nFinally vim registers made easy and fun! No more headaches with cumbersome keystrokes `\"\u003cregister\u003ep`, no more forgetting where the yanked text is: peek into the vim registers in floating window and pick up the text you want with `nvim-peekup`!\n\n![](https://user-images.githubusercontent.com/15387611/189754642-323b574f-433f-439a-9bcb-2f20fe0bc0c3.png)\n\n## Installation\n\nInstall it using your favourite plugin manager; for instance if you are using vim-plug\n\n```\nPlug 'gennaro-tedesco/nvim-peekup'\n```\n\n## Usage\n\nOpen the peekup window with the default keymapping `\"\"`. Scroll and browse the list of registers ordered by type and select the register you want by simply pressing the corresponding character (letter or number, no need to prepend `\"`): you receive visual confirmation for your choice and the text is copied into the default register. The peekup window automatically closes and you can now easily put (`p`) your yanked text anywhere you want.\n\n`\u003cEsc\u003e` to manually close the window otherwise (the peekup window closes automatically also when changing windows focus).\n\n![demo](https://user-images.githubusercontent.com/15387611/113494882-03645880-94ed-11eb-90f5-1beeeeeee09a.gif)\n\nDefault commands\n\n| key              | description                                            |\n| :--------------- | :----------------------------------------------------- |\n| `\"\"`             | open peekup window                                     |\n| `\u003cEsc\u003e`          | close peekup window                                    |\n| any character    | select and copy text from the corresponding \" register |\n| `\u003cC-j\u003e`, `\u003cC-k\u003e` | scroll the list up and down                            |\n| `\u003cUp\u003e`, `\u003cDown\u003e` | move to next registers type                            |\n| `\"x`             | empty all registers (outside the peekup window)        |\n\nNotice that since characters keystrokes copy the text from the corresponding register, the peekup window does not obey the standard vim motion commands. Arrow keys move among registers sections (they can also use the corresponding marks `'n, 'l, 's`).\n\nTo change default mapping to open the peekup window simply specify the right hand side of\n\n```\nlet g:peekup_open = '\u003cleader\u003e\"'\n```\n\nIf you want to directly paste before or after the current cursor position (without having to issue `p` after the selection) simply specify values for the options\n\n```\nlet g:peekup_paste_before = '\u003cleader\u003eP'\nlet g:peekup_paste_after = '\u003cleader\u003ep'\n```\n\nExposed interfaces\n\n| option                   | method                       | description                                 |\n| :----------------------- | :--------------------------- | :------------------------------------------ |\n| g:peekup_open            | `\u003cPlug\u003ePeekupOpen`           | open peekup window and interact             |\n| g:peekup_paste_before    | `\u003cPlug\u003ePeekupPasteBefore`    | directly paste before cursor upon selection |\n| g:peekup_paste_after     | `\u003cPlug\u003ePeekupPasteAfter`     | directly paste after cursor upon selection  |\n| g:peekup_empty_registers | `\u003cPlug\u003ePeekupEmptyRegisters` | clear all registers                         |\n\nsee also `:help peekup-usage`.\n\n## Features in short\n\n- peekup floating window with registers content\n- visual confirmation of selected text\n- peekup closes automatically, put (`p`) the yanked text anywhere\n- keymap to empty all registers\n- fully customisable layout and behaviour\n\n## Customisation\n\nThe look and the behaviour of the registers floating window is fully customisable. In order to do so simply override the [dictionary configuration entries](https://github.com/gennaro-tedesco/nvim-peekup/blob/master/lua/nvim-peekup/config.lua) specifying the below in your nvim configurations (init.vim or any other option file being sourced at start-up), say\n\n```\n\" geometry configuration\nlua require('nvim-peekup.config').geometry[\"height\"] = 0.8\nlua require('nvim-peekup.config').geometry[\"title\"] = 'An awesome window title'\nlua require('nvim-peekup.config').geometry[\"wrap\"] = false\n```\n\n`width` and `height` are to be expressed as ratios of the entire window size, therefore 0 \u003c x \u003c 1.\n\n```\n\" behaviour of the peekup window on keystroke\nlua require('nvim-peekup.config').on_keystroke[\"delay\"] = '300ms'\nlua require('nvim-peekup.config').on_keystroke[\"autoclose\"] = false\nlua require('nvim-peekup.config').on_keystroke[\"paste_reg\"] = '\"'\n```\n\n`delay` expresses the delay before the peekup window closes automatically, after selecting the register. Obviously, `autoclose` set to false prevents such behaviour (and the user must close the window manually).\n`delay` can be set to the empty string to not delay at all, i.e.:\n\n```\nlua require('nvim-peekup.config').on_keystroke[\"delay\"] = ''\n```\n\nThe selected paste goes into the default register `*`: change accordingly if needed (notice you may need to `set clipboard+=unnamed` for this to work).\n\n## Help tags\n\nAccess the documentation with `:h nvim-peekup`.\n\n## Unit tests\n\nWe make use of the busted framework for unit tests; run them with\n\n```\nbusted -C lua\n```\n\n## Feedback\n\nIf you find this plugin useful consider awarding it a ⭐, it is a great way to give feedback! Otherwise, any additional suggestions or merge request is warmly welcome!\n\nThis plugin was inspired by [vim-peekaboo](https://github.com/junegunn/vim-peekaboo), which in addition also allows to paste in insert mode. However, `nvim-peekup` offers a fresh interactive and visual experience with registers and, not that it matters, is in average more than 4 times faster at start-up:\n\n```\nnvim --startuptime start.log -c quit \u0026\u0026 grep \"peekup|peekaboo\" start.log\nelapsed\n000.051  000.051: sourcing ~/.config/nvim/plugged/nvim-peekup/plugin/nvim-peekup.vim\n000.212  000.212: sourcing ~/.config/nvim/plugged/vim-peekaboo/plugin/peekaboo.vim\n000.195  000.195: sourcing ~/.config/nvim/plugged/vim-peekaboo/autoload/peekaboo.vim\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgennaro-tedesco%2Fnvim-peekup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgennaro-tedesco%2Fnvim-peekup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgennaro-tedesco%2Fnvim-peekup/lists"}