Skip to content

Instantly share code, notes, and snippets.

@asadmoosvi
Last active June 18, 2024 13:10
Show Gist options
  • Save asadmoosvi/352e083ffccd4d4249563ff9e269c2ec to your computer and use it in GitHub Desktop.
Save asadmoosvi/352e083ffccd4d4249563ff9e269c2ec to your computer and use it in GitHub Desktop.
Download and install latest neovim on ubuntu
#!/usr/bin/env bash
OUTPUT_DIR="$HOME/.local/bin"
mkdir -p $OUTPUT_DIR
NVIM="$OUTPUT_DIR/nvim"
sudo apt install -y libfuse2 wget
wget 'https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage' -O $NVIM
chmod u+x $NVIM
echo -e "\n ✓ Installed neovim to $NVIM"
# add $HOME/.local/bin to path if it's not there already
cat <<'EOF' >>$HOME/.bashrc
if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then
export PATH="$HOME/.local/bin:$PATH"
fi
EOF
# clone neovim config
sudo apt install -y git
git clone "https://github.com/asadmoosvi/nvim" "$HOME/.config/nvim"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment