{"id":13761272,"url":"https://github.com/lucc/nvimpager","last_synced_at":"2025-05-15T15:07:49.488Z","repository":{"id":42187318,"uuid":"107990440","full_name":"lucc/nvimpager","owner":"lucc","description":"Use nvim as a pager to view manpages, diffs, etc with nvim's syntax highlighting","archived":false,"fork":false,"pushed_at":"2025-03-06T22:41:40.000Z","size":406,"stargazers_count":420,"open_issues_count":12,"forks_count":22,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-10T21:35:52.009Z","etag":null,"topics":["neovim","nvim","pager","vimpager"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucc.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-23T14:03:17.000Z","updated_at":"2025-05-07T16:44:05.000Z","dependencies_parsed_at":"2024-05-20T10:45:42.291Z","dependency_job_id":"1221210a-48f4-44f9-82f0-e03a2af296b9","html_url":"https://github.com/lucc/nvimpager","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucc%2Fnvimpager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucc%2Fnvimpager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucc%2Fnvimpager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucc%2Fnvimpager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucc","download_url":"https://codeload.github.com/lucc/nvimpager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"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":["neovim","nvim","pager","vimpager"],"created_at":"2024-08-03T13:01:46.657Z","updated_at":"2025-05-15T15:07:44.480Z","avatar_url":"https://github.com/lucc.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# Nvimpager\n\nUsing [neovim] as a pager to view man pages, git diffs, whatnot with neovim's\nsyntax highlighting and mouse support.\n\n## About\n\nThe `nvimpager` script calls neovim in a fashion that turns it into something\nlike a pager.  The idea is not new, this is actually rewrite of [vimpager] but\nwith less (but stricter) dependencies and specifically for neovim.\n\nSome typical use cases:\n\n```sh\n# view a file in nvimpager\nnvimpager file\n# pipe text to nvimpager\necho some text | nvimpager\n# use it as your default $PAGER\nexport PAGER=nvimpager\nman bash\ngit diff\n```\n\nThe script also has a \"cat mode\" which will not start up the neovim interface\nbut instead print a highlighted version of the file to the terminal.  Like cat\nwith neovim syntax highlighting!  If the input has less lines than the terminal\ncat mode is activated automatically so nvimpager behaves similar to `less -F`.\nPager mode and cat mode can be enforced with the options `-p` and `-c`\nrespectively.\n\nNvimpager comes with a small set of command line options but you can also use\nall of neovim's command line options.  Use `nvimpager -h` to see the [help\ntext][options].  The configuration is separated from the users config for\nneovim.  The main config file is `~/.config/nvimpager/init.vim` (or `.lua`).\nSee [the manpage][configuration] for further explanation.\n\n## Installation\n\n\u003ca href=\"https://repology.org/metapackage/nvimpager/versions\"\u003e\n    \u003cimg src=\"https://repology.org/badge/vertical-allrepos/nvimpager.svg?exclude_unsupported=1\"\n\t alt=\"Packaging status\" align=\"right\"\u003e\n\u003c/a\u003e\n\nNvimpager is already packaged for some distributions. If not for yours, you can\ninstall it manually, read on.\n\n### Dependencies\n\n* [neovim] ≥ v0.9.0\n* [bash]\n* [busted] (for running the tests)\n* [scdoc] (to build the man page)\n\n### Installation instructions\n\nUse the makefile to configure and install the script.  It supports the usual\n`PREFIX` (defaults to `/usr/local`) and `DESTDIR` (defaults to empty)\nvariables:\n\n```sh\nmake PREFIX=$HOME/.local install\n```\n\nThe target `install-no-man` can be used to install nvimpager without the man\npage.\n\nAdditionally the variable `BUSTED` can be used to specify the executable for\nthe test suite:\n\n```sh\nmake test BUSTED=\"/path/to/busted --some-args\"\n```\n\n## Development\n\nNvimpager is developed on [GitHub][nvimpager] where you are very much invited\nto [post][issues] bug reports, feature or pull requests!  The test can be run\nwith `make test`.  They are also run on GitHub: [![Build Status]][ghactions]\n\n### Limitations\n\n* if reading from stdin, nvimpager (like nvim) waits for EOF until it starts up\n* large files are slowing down neovim on startup (less does a better, i.e.\n  faster and more memory efficient job at paging large files)\n\n### Ideas\n* see how [neovim#5035], [neovim#7438] and [neovim#23093] are resolved and\n  maybe move more code (logic) from bash to lua (bash's `[[ -t ... ]]` can be\n  replaced by `has('ttyin')`, `has('ttyout')`)\n* proper lazy pipe reading while paging (like less) to improve startup time and\n  also memory usage for large input on pipes (maybe `stdioopen()` can be used?)\n\n## License\n\nThe project is licensed under a BSD-2-clause license.  See the\n[LICENSE](./LICENSE) file.\n\n[nvimpager]: https://github.com/lucc/nvimpager\n[issues]: https://github.com/lucc/nvimpager/issues\n[options]: ./nvimpager.md#command-line-options\n[configuration]: ./nvimpager.md#configuration\n[neovim]: https://github.com/neovim/neovim\n[vimpager]: https://github.com/rkitover/vimpager\n[bash]: https://www.gnu.org/software/bash/bash.html\n[busted]: https://lunarmodules.github.io/busted/\n[scdoc]: https://git.sr.ht/~sircmpwn/scdoc\n[Build Status]: https://github.com/lucc/nvimpager/actions/workflows/test.yml/badge.svg\n[ghactions]: https://github.com/lucc/nvimpager/actions\n[neovim#5035]: https://github.com/neovim/neovim/issues/5035 (detach / reattach)\n[neovim#7438]: https://github.com/neovim/neovim/issues/7438 (dynamic --headless)\n[neovim#23093]: https://github.com/neovim/neovim/issues/23093 (detach current tui)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucc%2Fnvimpager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucc%2Fnvimpager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucc%2Fnvimpager/lists"}