summaryrefslogtreecommitdiff
path: root/fedora/.local/bin/restartvim
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-28 15:42:50 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-28 15:42:50 +0900
commitae78dbbff81196f1d7bc8fabf84d05e6b9f3ca03 (patch)
treefdc69ee3e2772aa4db7e8efe4bd30d101c7f82ac /fedora/.local/bin/restartvim
parent06ad645351572c0e7188c52028998384d718df2e (diff)
updatesHEADmaster
Diffstat (limited to 'fedora/.local/bin/restartvim')
-rwxr-xr-xfedora/.local/bin/restartvim25
1 files changed, 0 insertions, 25 deletions
diff --git a/fedora/.local/bin/restartvim b/fedora/.local/bin/restartvim
deleted file mode 100755
index 3c63f8b..0000000
--- a/fedora/.local/bin/restartvim
+++ /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 Vim in the tmux pane
-tmux send-keys -t "$tmux_pane" Escape C-m ':wq' C-m
-
-# Wait to ensure Vim exits
-sleep 0.5
-
-# Detach the script from Vim and wait a bit to ensure Vim exits
-(nohup sh -c "sleep 0.5; tmux send-keys -t \"$tmux_pane\" 'vim -c \"execute \\\"edit \\\" . v:oldfiles[0] | normal '\''0\"' C-m" >/dev/null 2>&1 &)