/.zshrc Secret
Created
March 27, 2023 04:59
-
Star
(184)
You must be signed in to star a gist -
Fork
(26)
You must be signed in to fork a gist
-
-
Save elijahmanor/b279553c0132bfad7eae23e34ceb593b to your computer and use it in GitHub Desktop.
Neovim Switcher
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
| 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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I personally prefer to put the default config inside
~/.config/nvimand the other configs inside~/.config/nvims/<config_or_distro_name>so here's my version ofnvims(renamed tonvim_switch_configuration) which combines andyantrim's and mikeslattery's approaches which might be useful for some:Here's also a version using
fdinstead offind: