Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sbulav/nredir.nvim

Redirect the output of Vim or external command to scratch buffer, in LUA
https://github.com/sbulav/nredir.nvim

lua neovim neovim-plugin

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

nredir.nvim
=========

A [nredir](https://github.com/sbulav/nredir.nvim) Redirect the output of a Vim
or external command into a scratch buffer, in LUA.
It's basically an implementation of [Romainl's Redir](https://gist.github.com/romainl/eae0a260ab9c135390c30cd370c20cd7),
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:

```viml
nnoremap R :Nredir A
```

## Screenshot

[![nredir.nvim](https://i.postimg.cc/ZnYSbyQS/out.gif)](https://postimg.cc/cgzjT6Z9)