/nredir.nvim

Redirect the output of Vim or external command to scratch buffer, in LUA

Primary LanguageLuaMIT LicenseMIT

nredir.nvim

A nredir Redirect the output of a Vim or external command into a scratch buffer, in LUA. It's basically an implementation of Romainl's Redir, written for learn purposes in Lua.

Installing

NOTE: This plugin requires Neovim 0.5 versions

Plug 'sbulav/nredir.nvim'

Usage

Show full output of command :buffers in scratch window:

:Nredir buffers

Show full output of command !ls -la in scratch window:

:Nredir !ls -la
  • Pressing enter will maximize scratch window
  • Pressing q will automatically close the window
  • Pressing w will enable/disable wrap :h wrap

You can also create a mapping to open command-line window and substitute Nredir:

nnoremap <leader>R :Nredir <c-f>A

Screenshot

nredir.nvim