Windows目录:C:\Users\username\AppData\Local\nvim\init.vim
call plug#begin('~\AppData\Local\nvim\pluged')
" below are some vim plugin for demonstration purpose
Plug 'joshdick/onedark.vim'
Plug 'iCyMind/NeoSolarized'
Plug 'morhetz/gruvbox'
Plug 'preservim/nerdtree' "目录树
Plug 'jiangmiao/auto-pairs' "括号自动配对
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'arjunmahishi/run-code.nvim' "运行代码
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'luochen1990/rainbow' "彩虹括号
call plug#end()
set number "显示行号
set cursorline "光标所在行高亮
" 主题设置
" Plug 'iCyMind/NeoSolarized'
"set termguicolors
"colorscheme NeoSolarized
" Plug 'morhetz/gruvbox'
colorscheme gruvbox
set background=dark
highlight Normal guibg=NONE ctermbg=None
let g:rainbow_active = 1 "彩虹括号
set nocompatible "关闭与vi的兼容模式
set tabstop=4 " Tab = 4 空格
set expandtab " Tab 键在不同的编辑器缩进不一致,自动将 Tab 转为空格
set shiftwidth=4 " Indents will have a width of 4
set softtabstop=4 " Sets the number of columns for a TAB
syntax on "语法高亮
" 开启自动识别文件类型,并根据文件类型加载不同插件和缩进规则
filetype plugin indent on
"开启目录树
map <C-b> :NERDTreeToggle<CR>
" COC.VIM配置
" use <tab> for trigger completion and navigate to the next complete item
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
inoremap <silent><expr> <cr> coc#pum#visible() ? coc#_select_confirm() : "\<C-g>u\<CR>"
nvim
:PlugInstall # 安装插件
:PlugUpdate # 更新插件
:PlugStatus # 查看插件是否安装ok