Last active
August 7, 2023 17:43
-
-
Save practicalli-johnny/df3dca19908f7409a72da1739b216521 to your computer and use it in GitHub Desktop.
Neovim zsh selector
This file contains 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
# Neovim switcher | |
alias astro="NVIM_APPNAME=astronvim nvim" | |
alias nvim-practicalli="NVIM_APPNAME=neovim-config nvim" | |
alias nvim-practicalli-redux="NVIM_APPNAME=neovim-config-redux nvim" | |
alias nvim-magic-kit="NVIM_APPNAME=neovim-magic-kit nvim" | |
alias nvim-katawful="NVIM_APPNAME=neovim-katawful nvim" | |
alias nvim-chad="NVIM_APPNAME=NvChad nvim" | |
alias nvim-astro-old="NVIM_APPNAME=neovim-astronvim nvim" | |
alias nvim-nyoom="NVIM_APPNAME=neovim-nyoom nvim" | |
alias nvim-lispyclouds="NVIM_APPNAME=neovim-lispyclouds nvim" | |
# selection popup for choosing an nvim config | |
function nvim-selector() { | |
items=("astro" "neovim-config-redux" "neovim-config" "neovim-magic-kit" "neovim-katawful" "NvChad" "neovim-astronvim" "neovim-nyoom") | |
config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovim Config " --height=50% --layout=reverse --border --exit-0) | |
if [[ -z $config ]]; then | |
echo "Nothing selected" | |
return 0 | |
elif [[ $config == "default" ]]; then | |
config="" | |
fi | |
NVIM_APPNAME=$config nvim $@ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment