Reformat key listing.

This commit is contained in:
Arun Prakash Jana 2017-04-24 03:15:06 +05:30
parent b4166192e6
commit 012662ab89
No known key found for this signature in database
GPG key ID: A75979F35C080412
2 changed files with 68 additions and 65 deletions

View file

@ -128,39 +128,41 @@ nnn needs libreadline, libncursesw (on Linux or ncurses on OS X) and standard li
#### Keyboard shortcuts #### Keyboard shortcuts
| Key | Function | ```
| --- | --- | Key | Function
| `Up`, `k`, `^P` | Previous entry | -+-
| `Down`, `j`, `^N` | Next entry | Up, k, ^P | Previous entry
| `PgUp`, `^U` | Scroll half page up | Down, j, ^N | Next entry
| `PgDn`, `^D` | Scroll half page down | PgUp, ^U | Scroll half page up
| `Home`, `g`, `^`, `^A` | Jump to first entry | PgDn, ^D | Scroll half page down
| `End`, `G`, `$`, `^E` | Jump to last entry | Home, g, ^, ^A | Jump to first entry
| `Right`, `Enter`, `l`, `^M` | Open file or enter dir | End, G, $, ^E | Jump to last entry
| `Left`, `Backspace`, `h`, `^H` | Go to parent dir | Right, Enter, l, ^M | Open file or enter dir
| `~` | Jump to HOME dir | Left, Bksp, h, ^H | Go to parent dir
| `&` | Jump to initial dir | ~ | Jump to HOME dir
| `-` | Jump to last visited dir | & | Jump to initial dir
| `o` | Open dir in `NNN_DE_FILE_MANAGER` | - | Jump to last visited dir
| `/` | Filter dir contents | o | Open dir in NNN_DE_FILE_MANAGER
| `c` | Show change dir prompt | / | Filter dir contents
| `d` | Toggle detail view | c | Show change dir prompt
| `D` | Toggle current file details screen | d | Toggle detail view
| `m` | Show concise mediainfo | D | Toggle current file details screen
| `M` | Show full mediainfo | m | Show concise mediainfo
| `.` | Toggle hide .dot files | M | Show full mediainfo
| `s` | Toggle sort by file size | . | Toggle hide .dot files
| `S` | Toggle disk usage analyzer mode | s | Toggle sort by file size
| `t` | Toggle sort by modified time | S | Toggle disk usage analyzer mode
| `!` | Spawn `SHELL` in `PWD` (fallback sh) | t | Toggle sort by modified time
| `z` | Run `top` | ! | Spawn SHELL in PWD (fallback sh)
| `e` | Edit entry in `EDITOR` (fallback vi) | z | Run top
| `p` | Open entry in `PAGER` (fallback less) | e | Edit entry in EDITOR (fallback vi)
| `^K` | Invoke file name copier | p | Open entry in PAGER (fallback less)
| `^L` | Force a redraw | ^K | Invoke file name copier
| `?` | Toggle help screen | ^L | Force a redraw
| `q` | Quit | ? | Toggle help screen
| `Q` | Quit and change directory | q | Quit
Q | Quit and change directory
```
#### Filters #### Filters

65
nnn.c
View file

@ -937,38 +937,39 @@ static int
show_help(void) show_help(void)
{ {
char helpstr[] = ("echo \"\ char helpstr[] = ("echo \"\
<< Key >> << Function >>\n\n\ Key | Function\n\
[Up], k, ^P Previous entry\n\ -+-\n\
[Down], j, ^N Next entry\n\ Up, k, ^P | Previous entry\n\
[PgUp], ^U Scroll half page up\n\ Down, j, ^N | Next entry\n\
[PgDn], ^D Scroll half page down\n\ PgUp, ^U | Scroll half page up\n\
[Home], g, ^, ^A Jump to first entry\n\ PgDn, ^D | Scroll half page down\n\
[End], G, $, ^E Jump to last entry\n\ Home, g, ^, ^A | Jump to first entry\n\
[Right], [Enter], l, ^M Open file or enter dir\n\ End, G, $, ^E | Jump to last entry\n\
[Left], [Backspace], h, ^H Go to parent dir\n\ Right, Enter, l, ^M | Open file or enter dir\n\
~ Jump to HOME dir\n\ Left, Bksp, h, ^H | Go to parent dir\n\
& Jump to initial dir\n\ ~ | Jump to HOME dir\n\
- Jump to last visited dir\n\ & | Jump to initial dir\n\
o Open dir in NNN_DE_FILE_MANAGER\n\ - | Jump to last visited dir\n\
/ Filter dir contents\n\ o | Open dir in NNN_DE_FILE_MANAGER\n\
c Show change dir prompt\n\ / | Filter dir contents\n\
d Toggle detail view\n\ c | Show change dir prompt\n\
D Toggle current file details screen\n\ d | Toggle detail view\n\
m Show concise mediainfo\n\ D | Toggle current file details screen\n\
M Show full mediainfo\n\ m | Show concise mediainfo\n\
. Toggle hide .dot files\n\ M | Show full mediainfo\n\
s Toggle sort by file size\n\ . | Toggle hide .dot files\n\
S Toggle disk usage analyzer mode\n\ s | Toggle sort by file size\n\
t Toggle sort by modified time\n\ S | Toggle disk usage analyzer mode\n\
! Spawn SHELL in PWD (fallback sh)\n\ t | Toggle sort by modified time\n\
z Run top\n\ ! | Spawn SHELL in PWD (fallback sh)\n\
e Edit entry in EDITOR (fallback vi)\n\ z | Run top\n\
p Open entry in PAGER (fallback less)\n\ e | Edit entry in EDITOR (fallback vi)\n\
^K Invoke file name copier\n\ p | Open entry in PAGER (fallback less)\n\
^L Force a redraw\n\ ^K | Invoke file name copier\n\
? Toggle help screen\n\ ^L | Force a redraw\n\
q Quit\n\ ? | Toggle help screen\n\
Q Quit and change directory\n\n\" | less"); q | Quit\n\
Q | Quit and change directory\n\n\" | less");
return system(helpstr); return system(helpstr);
} }