dotfiles/nnn/.local/bin/vim-wrapper

14 lines
287 B
Bash
Executable file

#!/usr/bin/env bash
if [ "$TERM_PROGRAM" != "WezTerm" ]; then
exec nvim "$@"
fi
pane_id=$(wezterm cli get-pane-direction Right)
if [ -z "$pane_id" ] && [ ! -d "$1" ]; then
exec wezterm cli split-pane --right --percent 70 -- nvim "$@"
else
exec wezterm cli spawn -- nvim "$@"
fi