Abstract
i want to code with vim but i haven’t configt that for a long time. today i make up mine mind to config vim.
Referance
https://www.youtube.com/watch?v=ctH-a-1eUME&list=PLhoH5vyxr6Qq41NFL4GvhFp-WLd5xzIzZ
install nvim & config
-S neovim
sudo pacman
://github.com/LunarVim/Neovim-from-scratch
git clone https
-from-scratch/usr
cd neovim
01-options
git checkout
.lua nvim options
you can read and help from this command
:help options
:help bachup
...
key map
key map is very usefull this will make vim like some ide
-b 02-keymap git checkout
vimPlug
plug will make you vim becom more powerfull
nvim pulg install path is
/.local/share/nvim/site/pack/packer/start
~
:packerXXXX
install plugs
/home/dd21/.config/nvim/lua/user cd
add pulg link this
install markdownPreview
"iamcco/markdown-preview.nvim" -- 这里按照官方的命令发生vim:492错误不知道怎么回事,不添加选项没有任何问题
use
:w
/home/dd21/.local/share/nvim/site/pack/packer/opt/markdown-preview.nvim/app
cd
-S yarn
sudo pacman
yarn install
.md
nvim README# then input
:MarkDownPreview
color theme
you can use defualt nvim color theme
open the init.lua
nvim options.lua
# open the line 19 annotation
termguicolors = true
# set the colortheme in terminal
:colorscheme tokyonight
you open nvim per time to setup color theme, if you want to set for ever
nvim ./lua/user/colorscheme.lua
local colorscheme = "tokyonight"
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
if not status_ok then
vim.notify("colorscheme " .. colorscheme .. " not found!")
return
end
lsp install
.lua
cd plug
# install plug
:w
# show lsp install info window
lspinstall
# add with `i`
# remove with `x`