neovim の最新バージョンをインストールする手順となっています。
neovim ダウンロードおよびインストール #
最新版をダウンロードして /opt 配下に解凍する手順となっています。
ダウンロードおよびインストールコマンド
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo rm -rf /opt/nvim-linux-x86_64
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gzダウンロードおよびインストール実行例
kazu@ubuntu2604:~$ curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
100 10.87M 100 10.87M 0 0 16.51M 0 0
kazu@ubuntu2604:~$ sudo rm -rf /opt/nvim-linux-x86_64
kazu@ubuntu2604:~$ sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
kazu@ubuntu2604:~$ ls -ltr /opt
total 4
drwxr-xr-x 5 root root 4096 Jul 19 18:34 nvim-linux-x86_64
kazu@ubuntu2604:~$実行したカレントディレクトリにはダウンロード時のnvim-linux-x86_64.tar.gzのファイルが残っていますので、不要なら削除してください。
環境変数(PATH)の設定 #
/opt 配下にインストールされているため、PATHを追加します。
環境変数(PATH)の設定
echo 'export PATH="$PATH:/opt/nvim-linux-x86_64/bin"' >> ~/.bashrc
source ~/.bashrcneovim 起動 #
nvim 起動コマンド
nvimnvim 実行例
kazu@ubuntu2604:~$ nvim
~
~
~
~ │ ╲ ││
~ ││╲╲││
~ ││ ╲ │
~
~ NVIM v0.12.4
~ ────────────────────────────────────────────
~ Nvim is open source and freely distributable
~ https://neovim.io/#chat
~ ────────────────────────────────────────────
~ type :help nvim<Enter> if you are new!
~ type :checkhealth<Enter> to optimize Nvim
~ type :q<Enter> to exit
~ type :help<Enter> for help
~ ────────────────────────────────────────────
~ type :help news<Enter> for v0.12 notes
~ ────────────────────────────────────────────
~ Help poor children in Uganda!
~ type :help Kuwasha<Enter> for information
~
~
[No Name] 0,0-1 All