All Projects → lucc → Nvimpager

lucc / Nvimpager

Licence: other
Use nvim as a pager to view manpages, diffs, etc with nvim's syntax highlighting

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Nvimpager

Awesome Vim Colorschemes
Collection of awesome color schemes for Neo/vim, merged for quick use.
Stars: ✭ 1,951 (+1389.31%)
Mutual labels:  neovim, nvim
Dotfiles
🏠
Stars: ✭ 60 (-54.2%)
Mutual labels:  neovim, nvim
Vimrc
📝 Vim Configuration for nerds with vim-plug
Stars: ✭ 33 (-74.81%)
Mutual labels:  neovim, nvim
Defx.nvim
📁 The dark powered file explorer implementation
Stars: ✭ 917 (+600%)
Mutual labels:  neovim, nvim
Ncm R
R autocompletion for Neovim and vim 8 📝 📊 ⚡️
Stars: ✭ 102 (-22.14%)
Mutual labels:  neovim, nvim
Vim Dirvish
Directory viewer for Vim ⚡️
Stars: ✭ 929 (+609.16%)
Mutual labels:  neovim, nvim
Nvim Lspconfig
Quickstart configurations for the Nvim LSP client
Stars: ✭ 3,410 (+2503.05%)
Mutual labels:  neovim, nvim
Nvim
The Ultimate NeoVim Config for Colemak Users
Stars: ✭ 754 (+475.57%)
Mutual labels:  neovim, nvim
Gnvim
GUI for neovim, without any web bloat
Stars: ✭ 1,271 (+870.23%)
Mutual labels:  neovim, nvim
Page
Use neovim as pager
Stars: ✭ 83 (-36.64%)
Mutual labels:  neovim, pager
Deoplete Phpactor
Phpactor integration for deoplete.nvim
Stars: ✭ 17 (-87.02%)
Mutual labels:  neovim, nvim
Nvim Bqf
Better quickfix window in Neovim, polish old quickfix window.
Stars: ✭ 120 (-8.4%)
Mutual labels:  neovim, nvim
Thinkvim
Vim configuration in the 21st century
Stars: ✭ 832 (+535.11%)
Mutual labels:  neovim, nvim
Nvim Completion Manager
⚠️ PLEASE USE https://github.com/ncm2/ncm2 INSTEAD
Stars: ✭ 950 (+625.19%)
Mutual labels:  neovim, nvim
Semshi
🌈 Semantic Highlighting for Python in Neovim
Stars: ✭ 758 (+478.63%)
Mutual labels:  neovim, nvim
Nvim Hlslens
Hlsearch Lens for Neovim
Stars: ✭ 55 (-58.02%)
Mutual labels:  neovim, nvim
Chadtree
File manager for Neovim. Better than NERDTree.
Stars: ✭ 653 (+398.47%)
Mutual labels:  neovim, nvim
Nvim Lua Guide
A guide to using Lua in Neovim
Stars: ✭ 750 (+472.52%)
Mutual labels:  neovim, nvim
Nvim Nonicons
Icon set using nonicons for neovim plugins and settings
Stars: ✭ 77 (-41.22%)
Mutual labels:  neovim, nvim
Neovim
Vim-fork focused on extensibility and usability
Stars: ✭ 49,389 (+37601.53%)
Mutual labels:  neovim, nvim

Nvimpager

Using neovim as a pager to view man pages, git diffs, whatnot with neovim's syntax highlighting and mouse support.

About

The nvimpager script calls neovim in a fashion that turns it into something like a pager. The idea is not new, this is actually rewrite of vimpager but with less (but stricter) dependencies and specifically for neovim.

Some typical use cases:

# view a file in nvimpager
nvimpager file
# pipe text to nvimpager
echo some text | nvimpager
# use it as your default $PAGER
export PAGER=nvimpager
man bash
git diff

The script also has a "cat mode" which will not start up the neovim interface but instead print a highlighted version of the file to the terminal. Like cat with neovim syntax highlighting! If the input has less lines than the terminal cat mode is activated automatically so nvimpager behaves similar to less -F. Pager mode and cat mode can be enforced with the options -p and -c respectively.

Nvimpager comes with a small set of command line options but you can also use all of neovim's command line options. Use nvimpager -h to see the help text. The configuration is separated from the users config for neovim. The main config file is ~/.config/nvimpager/init.vim. See the manpage for further explanation.

Installation

Packaging status

Nvimpager is already packaged for some distributions. If not for yours, you can install it manually, read on.

Dependencies

Installation instructions

Use the makefile to install the script and its dependencies. It supports the usual PREFIX (defaults to /usr/local) and DESTDIR (defaults to empty) variables:

make PREFIX=$HOME/.local install

You can select between pandoc and lowdown to generate the man page with the MARKDOWN_PROCESSOR variable

Development

Nvimpager is developed on Github where you are very much invited to post bug reports, feature or pull requests! The test can be run with make test. They are also run on travis: Build Status

Known Bugs (and non features)

  • if reading from stdin, nvimpager (like nvim) waits for EOF until it starts up
  • large files are slowing down neovim on startup (less does a better, i.e. faster and more memory efficient job at paging large files)

TODO and ideas list

  • see how neovim#7428 and neovim#8246 are resolved and maybe move more code (logic) from bash to lua (bash's [[ -t ... ]] can be replaced by has('ttyin'), has('ttyout'))
  • proper lazy pipe reading while paging (like less) to improve startup time and also memory usage for large input on pipes (maybe stdioopen() can be used?)
  • properly kill the nvim process when the bash script is killed, alternatively ...
  • move temp file handling (removal) to nvim/lua (in a VimLeave autocommand) and exec nvim

License

The project is licensed under a BSD-2-clause license. See the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].