Skip to content

Detached file editing while still being able to use nnn for other files/quit nnn #1945

Closed Answered by vorboyvo
vorboyvo asked this question in Q&A
Discussion options

You must be logged in to vote

Figured it out! I change the else condition of the script as follows:

#!/usr/bin/env sh

if [ -n "$TMUX" ] ; then
    # tmux session running
    tmux split-window -h "$EDITOR \"$*\""
else
    # Remove option --tab for new window
    ( alacritty -e $EDITOR $* & )
fi

so that it spawns the terminal as a separate process and not as a child.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vorboyvo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant