Skip to content

Troubleshooting

Mischievous Meerkat edited this page Mar 21, 2021 · 63 revisions

Wrong file opener

If your text files are opening in the browser, check out the program option -e.

Use the following command to set default applications for mimetypes when using xdg-open as opener:

xdg-mime default application mimetype(s)
e.g.
xdg-mime default sxiv.desktop image/jpeg image/png

Batch rename limits

TL;DR: If you need a full-featured batch-renamer, install plugins. nnn auto-detects and invokes the internal plugin .nmv (a bash script) which is feature-complete.

The in-built batch-renamer implemented in nnn is a very simplified one. It's single-pass - reads the name/path of files iteratively (from a list of source files) and renames/moves them (as specified in the corresponding line number in a list of renamed/destination files). It doesn't handle deletions or perform any pre-parsing to account for rename loops, swaps, replaces, etc.

Tmux configuration

nnn may not handle keypresses correctly when used with tmux (see issue #104 for more details). Set TERM=xterm-256color to address it.

By default tmux advertises 8-color support. To show icons in tmux add the following to tmux configuration file:

set -g default-terminal "screen-256color"

If the Esc key isn't working as expected, add the following in .tmux.conf:

set -g escape-time 0

To start nnn within tmux use a shell function:

n ()
{
    # use option -a for previews
    tmux new-session nnn -a $@
}

Broken control key

If a Ctrl-key combination is not working, check if it's masked due to terminal line settings:

stty -a

If that's the case, clear (undef) the setting. E.g.:

stty start undef
stty stop undef
stty lwrap undef
stty lnext undef

You can do this when starting nnn. See the quitcd scripts.

Can't list within list

List view is a temporary view of symlinks. To avoid remembering the temporary paths to all listed views the current path is removed when the next list is loaded. This is also inline with the fact that find doesn't look within symlinks to directories. If you need to search the entries within a loaded list, visit the original directory and run the refined search.

BSD terminal issue

TL;DR: On releases previous to v2.7, use the keybind K to toggle selection if you are having issues with ^Y.

On OpenBSD & FreeBSD (and probably on macOS as well) stty maps ^Y to DSUSP by default. This means that typing ^Y will suspend nnn as if you typed ^Z (you can bring nnn back to the foreground by issuing fg) instead of entering multi-selection mode. You can check this with stty -a. If it includes the text dsusp = ^Y, issuing stty dsusp undef will disable this DSUSP and let nnn receive the ^Y instead.

Help not showing

If your PAGER is less, remove the option -F (automatically exit if the entire file can be displayed on the first screen). There are other screens which use less as well.

Amethyst WM

There's a known issue with Amethyst window manager on macOS - redraws do not work correctly and the screen breaks. See issue #521 for more details.

Clone this wiki locally