Last active
August 21, 2023 08:46
-
-
Save ehzawad/1b9e91056f4cba59f114e5b2193c91ee to your computer and use it in GitHub Desktop.
neovim from source
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
Access to the latest features of Neovim | |
Install Neovim in the location you wish | |
Installation | |
(1) Install the build prerequisites: | |
sudo apt-get install ninja-build \ | |
gettext libtool libtool-bin \ | |
autoconf automake cmake g++ \ | |
pkg-config unzip | |
(2) Clone the Neovim repository: | |
git clone https://github.com/neovim/neovim.git | |
(3) To install the stable release, run the following (otherwise the latest version of Neovim will be installed): | |
git checkout stable | |
(4) Build Neovim with build type ‘Release’ for better performance and in the location of your choice: | |
make CMAKE_BUILD_TYPE=Release \ | |
CMAKE_INSTALL_PREFIX=<NEOVIM_LOCATION> install | |
(5) Add the following line to your .bashrc file: | |
export PATH=”<NEOVIM_LOCATION>/bin:$PATH” | |
(6) Enjoy Neovim: | |
nvim awesome-file.txt | |
(7) Make sure that everything is in order by typing :checkhealth inside Neovim and verify that the output is similar to this: | |
Neovim’s :checkhealth partial output | |
If anything went wrong | |
If something went wrong during the installation, try the following: | |
(1) Run the following command in the location where you clone the Neovim repository: | |
rm -rf build .deps # the command 'make distclean' performs the same | |
(2) Try again the installation process | |
Uninstall | |
If you wish to uninstall Neovim, it is pretty simple: | |
sudo rm -rf <NEOVIM_LOCATION> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo make install