diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-28 19:03:01 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-28 19:03:01 +0900 |
| commit | cbd1d349a511da7a861540a5d6ea954d4d06871b (patch) | |
| tree | 92b932d351a9474e7fd0f12c6c973274daaaa0d9 /ar/.local/bin/restartnvim | |
| parent | 74cb5de14fc06fe97b6fc306f6176f7d6b467b6b (diff) | |
updates
Diffstat (limited to 'ar/.local/bin/restartnvim')
| -rwxr-xr-x | ar/.local/bin/restartnvim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ar/.local/bin/restartnvim b/ar/.local/bin/restartnvim index 74d57c3..ab040ab 100755 --- a/ar/.local/bin/restartnvim +++ b/ar/.local/bin/restartnvim @@ -13,13 +13,13 @@ if [ -z "$TMUX" ]; then fi # Get the current tmux pane ID -TMUX_PANE=$(tmux display-message -p '#D') +tmux_pane=$(tmux display-message -p '#D') # Send Escape, :wq, and Enter to Neovim in the tmux pane -tmux send-keys -t "$TMUX_PANE" Escape C-m ':wq' C-m +tmux send-keys -t "$tmux_pane" Escape C-m ':wq' C-m # Wait to ensure Neovim exits sleep 0.5 # Detach the script from Neovim and wait a bit to ensure Neovim exits -(nohup sh -c "sleep 0.5; tmux send-keys -t \"$TMUX_PANE\" 'nvim -c \"execute \\\"edit \\\" . v:oldfiles[0] | normal '\''0\"' C-m" >/dev/null 2>&1 &) +(nohup sh -c "sleep 0.5; tmux send-keys -t \"$tmux_pane\" 'nvim -c \"execute \\\"edit \\\" . v:oldfiles[0] | normal '\''0\"' C-m" >/dev/null 2>&1 &) |
