aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Hiar <codyfh@gmail.com>2018-08-31 10:32:15 -0600
committerCody Hiar <codyfh@gmail.com>2018-09-21 14:20:26 -0600
commita693c4a004d6a90c099b80369c8030d5cca2f894 (patch)
tree86aba48b1ac76a865c4b7aff2cfd5c4f31195d54
parentd1abb56f063cfa7d721094dcba49facccca50644 (diff)
Removing unused script
-rwxr-xr-xscripts/tmux_open_filename_in_vim.sh39
1 files changed, 0 insertions, 39 deletions
diff --git a/scripts/tmux_open_filename_in_vim.sh b/scripts/tmux_open_filename_in_vim.sh
deleted file mode 100755
index 55f0c48..0000000
--- a/scripts/tmux_open_filename_in_vim.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-#
-# Author: Cody Hiar
-# Date: 2017-04-22
-#
-# Purpose: The purpose of this script is to accept a file name then find a tmux
-# pane that is currently running either vim or neovim and tell that pane to open
-# up the file. This script is meant to be used with a fuzzy find such as fzf so
-# that you can use an external fuzzy finder but still integrate it with vim
-#
-# Set options:
-# e: Stop script if command fails
-# u: Stop script if unset variable is referenced
-# x: Debug, print commands as they are executed
-# set -eu
-
-# Immutable globals
-readonly ARGS=( "$@" )
-readonly PROGNAME=$(basename "$0")
-
-# Main loop of program
-main() {
- if [[ -z ${ARGS[0]} ]]; then
- exit
- fi
- CURRENT_PANE=$(tmux display-message -p "#{pane_index}")
- PANES=($(tmux list-panes| awk -F: '{ print $1 }'))
- for pane in "${PANES[@]}"; do
- PANE_TTY=$(tmux display -p -t "$pane" '#{pane_tty}')
- ps -o state= -o comm= -t "$PANE_TTY" \
- | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$' &> /dev/null
- if [[ "$?" == 0 ]]; then
- filename="${ARGS[0]}"
- tmux send-keys -t "$pane" ":e $filename" Enter
- tmux select-pane -t "$pane"
- fi
- done
-}
-main