Skip to content

Instantly share code, notes, and snippets.

@carusog
Forked from elijahmanor/.zshrc
Created December 10, 2023 15:29
Show Gist options
  • Save carusog/9a645ee5590c510efd3467b91acc4ef8 to your computer and use it in GitHub Desktop.
Save carusog/9a645ee5590c510efd3467b91acc4ef8 to your computer and use it in GitHub Desktop.
Neovim Switcher
alias nvim-lazy="NVIM_APPNAME=LazyVim nvim"
alias nvim-kick="NVIM_APPNAME=kickstart nvim"
alias nvim-chad="NVIM_APPNAME=NvChad nvim"
alias nvim-astro="NVIM_APPNAME=AstroNvim nvim"
function nvims() {
items=("default" "kickstart" "LazyVim" "NvChad" "AstroNvim")
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 $@
}
bindkey -s ^a "nvims\n"
@carusog
Copy link
Author

carusog commented Dec 10, 2023

Was looking for a simple way to switch vim confs to test out, @elijahmanor nailed it.
Simple, and effective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment