Updated Live previews (markdown)

Mischievous Meerkat 2020-06-03 08:58:10 +05:30
parent c19529852d
commit 91dcc2b047
1 changed files with 6 additions and 9 deletions

@ -24,15 +24,7 @@ There are 2 ways to export it based on the use case:
```
This mechanism is suitable if you are using a single instance of `nnn`.
2. For multiple instances of `nnn`, use a different FIFO path for every instance, e.g. with an alias:
```sh
alias nnn='NNN_FIFO="$(mktemp -u)" nnn'
```
`nnn` will create the per-instance FIFO files.
As an alternative, use the option `-a` which has the same effect.
2. For multiple instances of `nnn`, use the option `-a` to create a new FIFO path for each instance.
### Using the plugin
@ -44,6 +36,11 @@ There are 3 previewer plugins for `nnn`, using various mechanisms to display the
- [preview-tabbed](https://github.com/jarun/nnn/blob/master/plugins/preview-tabbed): the preview window is a [tabbed](https://tools.suckless.org/tabbed) X window, files are viewed using Xembed capable programs ([mpv](https://mpv.io) for audio/video, [sxiv](https://github.com/muennich/sxiv) for images, [zathura](https://pwmt.org/projects/zathura) for PDF, xterm/urxvt/st + [nuke](https://github.com/jarun/nnn/blob/master/plugins/nuke) plugin text preview for other files)
- [preview-tui](https://github.com/jarun/nnn/blob/master/plugins/preview-tui): the preview window is either a tmux pane or a new terminal window, and files are previewed using simple text tools (tree, head, file). This is the most barebone, dependecy free preview plugin, and probably the one you want to start from if you want to make your own.
**Notes:**
1. `nnn` does not watch the hovered file and update the path if it's modified while under preview. Press <kbd>|</kbd> or click on the entry to update the preview without changing the hovered entry.
2. To close the `preview-tui` and `preview-kitty` preview windows, press <kbd>^C</kbd> on the preview window. Run the plugin again if you want to preview.
## Custom script configuration example
There are two aspects to creating a live preview: