]> Sergey Matveev's repositories - nnn.git/commitdiff
Document macros
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 19 Jan 2019 12:47:36 +0000 (18:17 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 19 Jan 2019 12:50:05 +0000 (18:20 +0530)
README.md
nnn.1

index 01678913880914657f6d195a71e046e38ac5adf0..5d4e7f200661a1c42a2141a97256d316f544d867 100644 (file)
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/nnn.1 b/nnn.1
index b126568f06bb77fee53f13d3a0212d2278e90f2a..c5a16471cf4cee4fd7ffc9301ea570b41c2103ec 100644 (file)
--- a/nnn.1
+++ b/nnn.1
@@ -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