mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge pull request #28968 from lkxed/20230325-0-How-to-Install-and-Use-Neovim-on-Ubuntu-and-other-Linux-Distributions
[手动选题][tech]: 20230325.0 ⭐️ How to Install and Use Neovim on Ubuntu and other Linux Distributions.md
This commit is contained in:
commit
5f442a2ac4
@ -0,0 +1,150 @@
|
||||
[#]: subject: "How to Install and Use Neovim on Ubuntu and other Linux Distributions"
|
||||
[#]: via: "https://itsfoss.com/install-neovim/"
|
||||
[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Install and Use Neovim on Ubuntu and other Linux Distributions
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
You must have heard about the famous Vim text editor already. However, this article is about its fork, Neovim.
|
||||
|
||||
Vim is also a fork of vi which makes Neovim fork of a fork. So, you can end up using anything for some of its unique traits.
|
||||
|
||||
If you decide to use Neovim, let me help you get started with it on Ubuntu and other Linux distributions.
|
||||
|
||||
### Neovim: Overview
|
||||
|
||||
![][2]
|
||||
|
||||
[Neovim][3] is a project known for its simple maintenance and community contributions. Moreover, the development effort is distributed well between multiple developers.
|
||||
|
||||
For end-users, Neovim is much more extensible than one would expect. The aim of Neovim is to provide better applications of it without compromising the traditional capabilities of Vim.
|
||||
|
||||
With a [GUI for Neovim,][4] you can get an enhanced editing experience.
|
||||
|
||||
### Features of Neovim
|
||||
|
||||
While you can explore all about it on its official website and its [GitHub page][5]. Let me highlight some features:
|
||||
|
||||
- Modern Graphical Interfaces
|
||||
- API access from many language including (C/C++, C#, Go, Haskell, Java/Kotlin, JavaScript/Node.js, Lua, Perl, Python, Ruby, Rust to name a few)
|
||||
- Embedded, scriptable terminal emulator
|
||||
- Asynchronous job control
|
||||
- Shared data among multiple instances
|
||||
- XDG base directories support
|
||||
- Compatible with most Vim plugins, including Ruby and Python plugins
|
||||
|
||||
💡
|
||||
|
||||
We advise you to learn the usage of Vim and Neovim before you start using it.
|
||||
|
||||
### Installing Neovim on Ubuntu and Linux
|
||||
|
||||
Installing Neovim is simple due to its popularity. As Neovim is available in official repos of any distribution you pick.
|
||||
|
||||
We also have a guide to [install Vim on Linux][6], in case you want that.
|
||||
|
||||
To install Neovim on Ubuntu, just click on the Ubuntu Software icon in the dock. Then, search for Neovim. You can select the snap or the deb version as per your preference. However, the deb package version will be an outdated version of Neovim.
|
||||
|
||||
![neovim listed on ubuntu software center][7]
|
||||
|
||||
And, if you do not want the snap version, you can grab the latest deb file from the [Github releases page for Neovim][8]. If you look closer in the releases page, there is an Appimage file as well.
|
||||
|
||||
If you want to utilize the terminal instead of the GUI, here's what you can do:
|
||||
|
||||
For **Ubuntu and Debian** based distributions, enter the following command to install
|
||||
|
||||
```
|
||||
sudo apt install neovim
|
||||
```
|
||||
|
||||
For **Manjaro and Arch Linux**, use the below command to update your system and install Neovim
|
||||
|
||||
```
|
||||
sudo pacman -Syu neovim
|
||||
```
|
||||
|
||||
For **Fedora**, use the following command
|
||||
|
||||
```
|
||||
sudo dnf install -y neovim
|
||||
```
|
||||
|
||||
To install the **Flatpak**, you can use this command
|
||||
|
||||
```
|
||||
flatpak install flathub io.neovim.nvim
|
||||
```
|
||||
|
||||
Lastly, to install the **snap package** use the below command
|
||||
|
||||
```
|
||||
sudo snap install nvim --classic
|
||||
```
|
||||
|
||||
If you prefer building software from source, follow [the steps given on the project's Github page][9].
|
||||
|
||||
### How to use Neovim
|
||||
|
||||
To use Neovim after installation is complete, just launch it from the application menu by pressing the super key and typing the name "neovim" without quotes. This will open a terminal window with Neovim open.
|
||||
|
||||
![][10]
|
||||
|
||||
Or you can just open any Terminal Emulator of your choice and enter the following command
|
||||
|
||||
```
|
||||
nvim
|
||||
```
|
||||
|
||||
Yes, not "neovim" but just "**nvim**". For example, to edit _/etc/fstab_ enter the following command.
|
||||
|
||||
```
|
||||
sudo nvim /etc/fstab
|
||||
```
|
||||
|
||||
Now the fstab file will open as shown in the screenshot below.
|
||||
|
||||
![][11]
|
||||
|
||||
Don't worry if you cannot exit the editor; press **Shift+Z+Z**. For example, if this shortcut key confuses, use the keys you need to type "ZZ" (uppercase) without quotes in any text editor.
|
||||
|
||||
On that note, I should re-iterate that you need to learn Vim or Neovim and go through the documentation to efficiently make use of all its features.
|
||||
|
||||
### Conclusion
|
||||
|
||||
Installing and launching Neovim is pretty straightforward but learning it will require some keyboard grinding for sure.
|
||||
|
||||
This was just an overview of the editor. I am not an expert on this, but I hope this serves well for all the beginners out there!
|
||||
|
||||
💬 _Do you use Neovim? Share your experience on it in the comments below._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-neovim/
|
||||
|
||||
作者:[Anuj Sharma][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/anuj/
|
||||
[b]: https://github.com/lkxed/
|
||||
[1]: https://itsfoss.com/content/images/2023/03/linux-mega-packt.webp
|
||||
[2]: https://itsfoss.com/content/images/2023/03/goneovim.png
|
||||
[3]: https://neovim.io/?ref=itsfoss.com
|
||||
[4]: https://itsfoss.com/neovim-gui-editors/
|
||||
[5]: https://github.com/neovim/neovim?ref=itsfoss.com
|
||||
[6]: https://itsfoss.com/install-latest-vim-ubuntu/
|
||||
[7]: https://itsfoss.com/content/images/2023/01/software-center-neovim-snap.png
|
||||
[8]: https://github.com/neovim/neovim/releases/tag/stable?ref=itsfoss.com
|
||||
[9]: https://github.com/neovim/neovim/wiki/Installing-Neovim?ref=itsfoss.com#install-from-source
|
||||
[10]: https://itsfoss.com/content/images/2023/01/neovim-default-screen.png
|
||||
[11]: https://itsfoss.com/content/images/2023/01/neovim-fstab.png
|
Loading…
Reference in New Issue
Block a user