➜ ~ sw_vers
ProductName: macOS
ProductVersion: 14.2.1
BuildVersion: 23C71
➜ ~ nvim -V1 -v
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1720049189
系统 vimrc 文件: "$VIM/sysinit.vim"
$VIM 预设值: "/opt/homebrew/Cellar/neovim/0.10.1/share/nvim"
Run :checkhealth for more info
brew install neovim将 init.vim,放置在 ~/.config/nvim/ 目录下,此 init.vim 中添加了自动 install vim-plug 的检查脚本:
打开 iterm2 执行命令 nvim
nvim打开的界面输入
:PlugInstall等待安装,与此同时,新开个终端界面,安装字体:Nerd Fonts (下面是把所有字体都下载了,换着体验吧)
brew tap homebrew/cask-fonts
brew search nerd
brew install --cask font-hack-nerd-font
brew install homebrew/cask-fonts/font-robotomono-nerd-font-mono
brew install --cask font-3270-nerd-font
brew install --cask font-fira-mono-nerd-font
brew install --cask font-inconsolata-go-nerd-font
brew install --cask font-inconsolata-lgc-nerd-font
brew install --cask font-inconsolata-nerd-font
brew install --cask font-monofur-nerd-font
brew install --cask font-overpass-nerd-font
brew install --cask font-ubuntu-mono-nerd-font
brew install --cask font-agave-nerd-font
brew install --cask font-arimo-nerd-font
brew install --cask font-anonymice-nerd-font
brew install --cask font-aurulent-sans-mono-nerd-font
brew install --cask font-bigblue-terminal-nerd-font
brew install --cask font-bitstream-vera-sans-mono-nerd-font
brew install --cask font-blex-mono-nerd-font
brew install --cask font-caskaydia-cove-nerd-font
brew install --cask font-code-new-roman-nerd-font
brew install --cask font-cousine-nerd-font
brew install --cask font-daddy-time-mono-nerd-font
brew install --cask font-dejavu-sans-mono-nerd-font
brew install --cask font-droid-sans-mono-nerd-font
brew install --cask font-fantasque-sans-mono-nerd-font
brew install --cask font-fira-code-nerd-font
brew install --cask font-go-mono-nerd-font
brew install --cask font-gohufont-nerd-font
brew install --cask font-hack-nerd-font
brew install --cask font-hasklug-nerd-font
brew install --cask font-heavy-data-nerd-font
brew install --cask font-hurmit-nerd-font
brew install --cask font-im-writing-nerd-font
brew install --cask font-iosevka-nerd-font
brew install --cask font-jetbrains-mono-nerd-font
brew install --cask font-lekton-nerd-font
brew install --cask font-liberation-nerd-font
brew install --cask font-meslo-lg-nerd-font
brew install --cask font-monoid-nerd-font
brew install --cask font-mononoki-nerd-font
brew install --cask font-mplus-nerd-font
brew install --cask font-noto-nerd-font
brew install --cask font-open-dyslexic-nerd-font
brew install --cask font-profont-nerd-font
brew install --cask font-proggy-clean-tt-nerd-font
brew install --cask font-roboto-mono-nerd-font
brew install --cask font-sauce-code-pro-nerd-font
brew install --cask font-shure-tech-mono-nerd-font
brew install --cask font-space-mono-nerd-font
brew install --cask font-terminess-ttf-nerd-font
brew install --cask font-tinos-nerd-font
brew install --cask font-ubuntu-nerd-font
brew install --cask font-victor-mono-nerd-font
安装完后,在 终端的 settings > Profiles > Text > Font 选择上面的其中一个字体,当然可以选择别的~
目前用的是 Hack Nerd Font Propo
- 字体安装:下载
Nerd Fonts后,通过 Mac & Windows 系统功能安装字体,在iTerm2或Terminal(WSL)中选择即可,NeoVim 中无需字体相关配置。 - Leader Key:
let g:mapleader = "," - ESC 映射:
imap jj <esc>
Plug 'rakr/vim-one'主题插件Plug 'vim-airline/vim-airline'状态栏主题Plug 'ryanoasis/vim-devicons'炫酷图标,依赖 Nerd FontsPlug 'luochen1990/rainbow'括号彩色匹配Plug 'kana/vim-fakeclip'拉齐各平台复制粘贴,使用时屏蔽默认,完全隔离Vim和系统剪贴板Plug 'neoclide/coc.nvim', {'branch': 'release'}自动补全神器Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }文件模糊查找Plug 'junegunn/fzf.vim'文件模糊查找Plug 'voldikss/vim-floaterm'Float terminalPlug 'mattn/emmet-vim'HTML 快速补全Plug 'ervandew/supertab'Tab功能增强,使用Tab键补全选择等Plug 'tpope/vim-commentary'自动注释插件Plug 'ntpeters/vim-better-whitespace'清除行末空格Plug 'justinmk/vim-sneak'光标快速移动
-
当使用
Plug 'voldikss/vim-floaterm',你会看到本配置文件中有nmap <leader>lz :FloatermNew lazygit<cr>该行指令,很明显需要有lazygit的执行环境: lazygit install 同时也需要在git的仓库内执行 -
Plug 'mattn/emmet-vim'自动补充,快捷键是control + y + ,更多使用说明看 mattn/emmet-vim -
Plug 'ervandew/supertab'Supertab is a vim plugin which allows you to use for all your insert completion needs (:help ins-completion). ervandew/supertab -
Plug 'tpope/vim-commentart注释 比如vmap gcnmap <leader>cctpope/vim-commentary -
Plug 'ntpeters/vim-better-whitespace'This plugin causes all trailing whitespace characters (see Supported Whitespace Characters below) to be highlighted. ntpeters/vim-better-whitespace -
Plug 'justinmk/vim-sneak'使用:help sneakJump to any location specified by two characters. justinmk/vim-sneak -
Plug 'preservim/nerdtree'A file system explorer for the Vim editor. preservim/nerdtree 我这里打开显示文件行数的功能