Skip to content

如何使用neovim和安裝lazyvim

Published: at 下午11:57

如何使用neovim和安裝lazyvim

安裝neovim

curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz 被雷過 下載下來檔案大小不對 換成stable也一樣 所以要固定版本

curl -LO https://github.com/neovim/neovim/releases/download/v0.10.3/nvim-linux64.tar.gz

sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf nvim-linux64.tar.gz

Then add this to your shell config (~/.bashrc, ~/.zshrc, …):

export PATH="$PATH:/opt/nvim-linux64/bin"

安裝lazyvim

# 需要
mv ~/.config/nvim ~/.config/nvim.bak
# 可选,但建议
mv ~/.local/share/nvim ~/.local/share/nvim.bak
mv ~/.local/state/nvim ~/.local/state/nvim.bak
mv ~/.cache/nvim ~/.cache/nvim.bak

克隆启动器

git clone https://github.com/LazyVim/starter ~/.config/nvim

删除.git文件夹,你可以稍后将其添加到你自己的仓库

rm -rf ~/.config/nvim/.git

启动 Neovim!

nvim

No C compiler found

sudo apt-get install build-essential

使用紀錄

如何開啟 terminal

ctrl+/

https://github.com/LazyVim/LazyVim/blob/fefcda543127bb9d6cf67a4ae3757b9c29bdabcc/lua/lazyvim/config/keymaps.lua#L165-L166

轉換區塊視窗

ctrl + h 左 ctrl + j 下 ctrl + k 上 ctrl + l 右