Update docs

This commit is contained in:
Arun Prakash Jana 2020-05-04 20:17:40 +05:30
parent 69e132e36d
commit a950510342
No known key found for this signature in database
GPG key ID: A75979F35C080412
4 changed files with 10 additions and 10 deletions

View file

@ -31,7 +31,7 @@ It runs smoothly on the Pi, [Termux](https://www.youtube.com/watch?v=AbaauM7gUJw
- Edit and preview markdown, man page, html - Edit and preview markdown, man page, html
- Open a file and auto-advance to the next - Open a file and auto-advance to the next
- Export (filtered) list of visible files - Export (filtered) list of visible files
- Find and list in `nnn` from `nnn` - find/fd/fzf/grep/ripgrep/fzf from `nnn` and list in `nnn`
- Unlimited bookmarks, plugins, commands with custom hotkeys - Unlimited bookmarks, plugins, commands with custom hotkeys
- Write a plugin in any language you know - Write a plugin in any language you know
- Configure the middle mouse click to do anything - Configure the middle mouse click to do anything

8
nnn.1
View file

@ -331,20 +331,20 @@ separated by \fI;\fR:
\fBNNN_PLUG:\fR directly executable plugins as \fIkey_char:location\fR pairs \fBNNN_PLUG:\fR directly executable plugins as \fIkey_char:location\fR pairs
separated by \fI;\fR: separated by \fI;\fR:
.Bd -literal .Bd -literal
export NNN_PLUG='o:fzopen;p:mocplay;d:diffs;m:nmount;t:imgthumb' export NNN_PLUG='f:finder;o:fzopen;p:mocplay;d:diffs;t:nmount;v:imgview'
NOTES: NOTES:
1. To run a plugin directly, press \fI;\fR followed by the plugin key. 1. To run a plugin directly, press \fI;\fR followed by the plugin key.
2. To skip directory refresh after running a plugin, prefix with \fB-\fR. 2. To skip directory refresh after running a plugin, prefix with \fB-\fR.
export NNN_PLUG='m:-mediainfo' export NNN_PLUG='m:-mediainf'
.Ed .Ed
.Pp .Pp
To assign keys to arbitrary non-background non-shell-interpreted cli To assign keys to arbitrary non-background non-shell-interpreted cli
commands and invoke like plugins, add \fI_\fR (underscore) before the commands and invoke like plugins, add \fI_\fR (underscore) before the
command. command.
.Bd -literal .Bd -literal
export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn;o:fzopen' export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn'
NOTES: NOTES:
1. Use single quotes for $NNN_PLUG so $nnn is not interpreted 1. Use single quotes for $NNN_PLUG so $nnn is not interpreted
@ -364,8 +364,8 @@ separated by \fI;\fR:
----------------------------------- + ------------------------------------------------- ----------------------------------- + -------------------------------------------------
Key:Command | Description Key:Command | Description
----------------------------------- + ------------------------------------------------- ----------------------------------- + -------------------------------------------------
k:-_fuser -kiv $nnn* | Interactively kill process(es) using hovered file
g:-_git diff | Show git diff g:-_git diff | Show git diff
k:-_fuser -kiv $nnn* | Interactively kill process(es) using hovered file
l:-_git log | Show git log l:-_git log | Show git log
n:-_vi /home/user/Dropbox/dir/note* | Take quick notes in a synced file/dir of notes n:-_vi /home/user/Dropbox/dir/note* | Take quick notes in a synced file/dir of notes
p:-_less -iR $nnn* | Page through hovered file in less p:-_less -iR $nnn* | Page through hovered file in less

View file

@ -78,7 +78,7 @@ Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`.
Use the plugin shortcut (<kbd>;key</kbd> or <kbd>^Skey</kbd>) to list the defined plugin keys and press the required key. E.g., with the below config: Use the plugin shortcut (<kbd>;key</kbd> or <kbd>^Skey</kbd>) to list the defined plugin keys and press the required key. E.g., with the below config:
```sh ```sh
export NNN_PLUG='o:fzopen;p:mocplay;d:diffs;m:nmount;n:notes;v:imgviu;t:imgthumb' export NNN_PLUG='f:finder;o:fzopen;p:mocplay;d:diffs;t:nmount;v:imgview'
``` ```
Plugin `fzopen` can be run with the keybind <kbd>;o</kbd>, `mocplay` can be run with <kbd>;p</kbd> and so on... The key vs. plugin pairs are shown in the help and config screen. Plugin `fzopen` can be run with the keybind <kbd>;o</kbd>, `mocplay` can be run with <kbd>;p</kbd> and so on... The key vs. plugin pairs are shown in the help and config screen.
@ -90,7 +90,7 @@ To select and invoke a plugin from the plugin directory, press <kbd>Enter</kbd>
`nnn` refreshes the directory after running a plugin to reflect any changes by the plugin. To disable this (say while running the `mediainfo` plugin on some filtered files), add a `-` before the plugin name: `nnn` refreshes the directory after running a plugin to reflect any changes by the plugin. To disable this (say while running the `mediainfo` plugin on some filtered files), add a `-` before the plugin name:
```sh ```sh
export NNN_PLUG='m:-mediainfo' export NNN_PLUG='m:-mediainf'
``` ```
Now `nnn` will not refresh the directory after running the `mediainfo` plugin. Now `nnn` will not refresh the directory after running the `mediainfo` plugin.
@ -102,7 +102,7 @@ To assign keys to arbitrary non-background, non-shell-interpreted cli commands a
For example: For example:
```sh ```sh
export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn;o:fzopen' export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn'
``` ```
Now <kbd>;x</kbd> can be used to make a file executable, <kbd>;g</kbd> can be used to the git log of a git project directory, <kbd>;s</kbd> can be used to preview a partially downloaded media file. Now <kbd>;x</kbd> can be used to make a file executable, <kbd>;g</kbd> can be used to the git log of a git project directory, <kbd>;s</kbd> can be used to preview a partially downloaded media file.
@ -136,8 +136,8 @@ Notes:
| Key:Command | Description | | Key:Command | Description |
|---|---| |---|---|
| `k:-_fuser -kiv $nnn*` | Interactively kill process(es) using hovered file |
| `g:-_git diff` | Show git diff | | `g:-_git diff` | Show git diff |
| `k:-_fuser -kiv $nnn*` | Interactively kill process(es) using hovered file |
| `l:-_git log` | Show git log | | `l:-_git log` | Show git log |
| `n:-_vi /home/user/Dropbox/dir/note*` | Take quick notes in a synced file/dir of notes | | `n:-_vi /home/user/Dropbox/dir/note*` | Take quick notes in a synced file/dir of notes |
| `p:-_less -iR $nnn*` | Page through hovered file in less | | `p:-_less -iR $nnn*` | Page through hovered file in less |

View file

@ -3,7 +3,7 @@
# Description: Run custom search and list results in smart context # Description: Run custom search and list results in smart context
# #
# Note: To enable multi select in fzf, export the following: # Note: To enable multi select in fzf, export the following:
# - export FZF_DEFAULT_OPTS='--bind ctrl-a:select-all,ctrl-d:deselect-all' # - export FZF_DEFAULT_OPTS='--bind ctrl-a:select-all,ctrl-d:deselect-all,ctrl-t:toggle'
# #
# Shell: POSIX compliant # Shell: POSIX compliant
# Author: Arun Prakash Jana # Author: Arun Prakash Jana