diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-12-08 10:52:01 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-12-08 10:52:01 +0900 |
| commit | 7d18f4cae5364ff0f4b90f88331e6519983ba3f2 (patch) | |
| tree | 4fcf215e705fb03558ba577a809ade586c8c01f5 /fedora/.local/bin/restartnvim | |
| parent | 0e1fcb2c62a20fb826944833db10562741d0042f (diff) | |
updates
Diffstat (limited to 'fedora/.local/bin/restartnvim')
| -rwxr-xr-x | fedora/.local/bin/restartnvim | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/fedora/.local/bin/restartnvim b/fedora/.local/bin/restartnvim deleted file mode 100755 index ab040ab..0000000 --- a/fedora/.local/bin/restartnvim +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -set -e - -# Set new line and tab for word splitting -IFS=" - " - -# Check if the script is running inside a tmux session -if [ -z "$TMUX" ]; then - echo "This script must be run from inside a tmux session." - exit 1 -fi - -# Get the current tmux pane ID -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 - -# 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 &) |
