Skip to content

Instantly share code, notes, and snippets.

@arunvelsriram
Last active Sep 4, 2021
Embed
What would you like to do?
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