Skip to content

Instantly share code, notes, and snippets.

@arunvelsriram
Last active December 16, 2021 22:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arunvelsriram/b601c8ead37341aa74983fe823c33af1 to your computer and use it in GitHub Desktop.
Save arunvelsriram/b601c8ead37341aa74983fe823c33af1 to your computer and use it in GitHub Desktop.
Bash function for opening NeovIm in a separte Alacritty window providing GUI like feel. Actually a TUI (Terminal UI).
# USAGE:
# anvim [path]
anvim() {
local target="${PWD}"
if [ -n "${1}" ]; then
target=$(realpath "$1")
fi
local wdir="${target}"
if [ -f "${target}" ]; then
wdir=$(dirname "${target}")
fi
nohup alacritty --config-file ~/.config/alacritty/anvim.yml \
--working-directory "${wdir}" \
-t "nvim - ${target}" \
-e $SHELL -lc "nvim ${target}" >/dev/null &
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment