tmux-edit-helper: open file directly on first launch
This commit is contained in:
parent
5020699941
commit
0221c3ec00
1 changed files with 7 additions and 7 deletions
|
@ -18,11 +18,11 @@ fi
|
|||
|
||||
_nvim_socket="$XDG_RUNTIME_DIR/nvim-persistent.sock"
|
||||
|
||||
tmux select-window -t nvim 2>/dev/null ||
|
||||
tmux new-window -S -n nvim \
|
||||
-e "BUILD_COMMAND=$BUILD_COMMAND" \
|
||||
-e "GOPACKAGESDRIVER=$GOPACKAGESDRIVER" \
|
||||
-e "GOFLAGS=$GOFLAGS" \
|
||||
nvim --listen "$_nvim_socket"
|
||||
tmux select-window -t nvim 2>/dev/null && exec nvim --server "$_nvim_socket" --remote "$_file"
|
||||
|
||||
nvim --server "$_nvim_socket" --remote "$_file"
|
||||
# nvim is not running/listening on remote socket, so start it.
|
||||
tmux new-window -S -n nvim \
|
||||
-e "BUILD_COMMAND=$BUILD_COMMAND" \
|
||||
-e "GOPACKAGESDRIVER=$GOPACKAGESDRIVER" \
|
||||
-e "GOFLAGS=$GOFLAGS" \
|
||||
nvim --listen "$_nvim_socket" "$_file"
|
||||
|
|
Loading…
Reference in a new issue