Last active
December 16, 2021 22:07
-
-
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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