Skip to content

Instantly share code, notes, and snippets.

@h4n2k
Last active July 27, 2024 14:37
Show Gist options
  • Save h4n2k/cc57d1e2833e9437676f3ae107176ac6 to your computer and use it in GitHub Desktop.
Save h4n2k/cc57d1e2833e9437676f3ae107176ac6 to your computer and use it in GitHub Desktop.
Multiple neovim
# Neovim Switcher
# https://gist.github.com/elijahmanor/b279553c0132bfad7eae23e34ceb593b
#
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"
# Neovide Switcher
alias neovide-lazy="NVIM_APPNAME=LazyVim neovide"
alias neovide-kick="NVIM_APPNAME=kickstart neovide"
alias neovide-chad="NVIM_APPNAME=NvChad neovide"
alias neovide-astro="NVIM_APPNAME=AstroNvim neovide"
function neovides() {
items=("default" "kickstart" "LazyVim" "NvChad" "AstroNvim")
config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovide 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 neovide $@
}
bindkey -s ^a "neovides\n"
rm -rf ~/.config/nvim
rm -rf ~/.local/share/nvim
rm -rf ~/.local/state/nvim
rm -rf ~/.cache/nvim
brew uninstall neovim
brew cleanup
brew upgrade
brew install --HEAD neovim
brew upgrade neovim --fetch-HEAD
nvim .zshrc
source ~/.zshrc
git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/AstroNvim
source ~/.zshrc
git clone https://github.com/NvChad/NvChad ~/.config/NvChad --depth 1
git clone https://github.com/LazyVim/starter ~/.config/LazyVim
git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/kickstart
@h4n2k
Copy link
Author

h4n2k commented May 31, 2023

@h4n2k
Copy link
Author

h4n2k commented May 31, 2023

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