Document macros

This commit is contained in:
Arun Prakash Jana 2019-01-19 18:17:36 +05:30
parent 88a940dcab
commit 78048d6ef0
No known key found for this signature in database
GPG Key ID: A75979F35C080412
2 changed files with 25 additions and 3 deletions

View File

@ -56,6 +56,7 @@ It runs on Linux, macOS, Raspberry Pi, BSD, Cygwin, Linux subsystem for Windows
- [Navigate-as-you-type](#navigate-as-you-type)
- [File indicators](#file-indicators)
- [Utility dependencies](#utility-dependencies)
- [Configuration](#configuration)
- [Help](#help)
- [Quickstart](#quickstart)
- [How to](#how-to)
@ -367,6 +368,27 @@ Arguments to the `$PAGER` and `$SHELL` should be combined together.
The option `open with` takes 1 combined argument.
#### Configuration
`nnn` supports the following environment variables for configuration.
| Example `export` | Description |
| --- | --- |
| `NNN_OPENER=mimeopen` | custom file opener |
| `NNN_BMS='d:~/Documents;D:~/Docs archive/'` | specify bookmarks (max 10) |
| `NNN_USE_EDITOR=1` | Open text files in `$EDITOR` (`$VISUAL` takes preference), fallback vi |
| `NNN_CONTEXT_COLORS='1234'` | specify per context color [default: '4444' (all blue)] |
| `NNN_IDLE_TIMEOUT=300` | idle time to lock terminal [default: disabled] |
| `NNN_COPIER='copier.sh'` | system clipboard copier script [default: none] |
| `NNN_SCRIPT=/home/user/scripts[/script.sh]` | path to script dir or a single script |
| `NNN_NOTE=/home/user/Dropbox/Public/notes` | path to note file [default: none] |
| `NNN_SHOW_HIDDEN=1` | show hidden (dot) files [default: do not show hidden if not root ] |
| `NNN_NO_AUTOSELECT=1` | do not auto-select matching dir in _nav-as-you-type` mode |
| `NNN_RESTRICT_NAV_OPEN=1` | open files on <kbd></kbd>, not <kbd></kbd> or <kbd>l</kbd> |
| `NNN_RESTRICT_0B=1` | do not open 0-byte files |
| `NNN_PLAIN_FILTER` | use substring match in filer mode [default: regex] |
| `NNN_TMPFILE=/tmp/nnn` | file to write current open dir path to for cd on quit |
#### Help
$ nnn -h

6
nnn.1
View File

@ -272,7 +272,7 @@ when dealing with the !, e and p commands respectively. A single combination to
NOTE: Bookmark keys should be single-character to use them in combination with the Leader key.
.Ed
.Pp
\fBNNN_USE_EDITOR:\fR use EDITOR (preferably CLI, fallback vi) to handle text
\fBNNN_USE_EDITOR:\fR use EDITOR (VISUAL takes preference, preferably CLI, fallback vi) to handle text
files.
.Bd -literal
export NNN_USE_EDITOR=1
@ -287,9 +287,9 @@ files.
.Pp
\fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker (default: disabled).
.Pp
\fBNNN_COPIER:\fR set to a clipboard copier script.
\fBNNN_COPIER:\fR system clipboard copier script.
.Bd -literal
NOTE: By default file paths are copied to the tmp file \fBDIR/.nnncp\fR, where 'DIR' (by priority) is:
NOTE: File paths are copied to the tmp file \fBDIR/.nnncp\fR, where 'DIR' (by priority) is:
\fI$HOME\fR or, \fI$TMPDIR\fR or, \fI/tmp\fR.
The path is shown in the help and configuration screen.
.Ed