1、系统有一个vim配置文件:
mac在/usr/share/vim/vimrc,其他大多咋/etc/vim/vimrc或者/etc/vimrc,这个文件是系统级安全文件,只读
2、自定义vim配置文件:
自定义vim配置文件在用户目录,本身不存在,需要添加,可以把系统那个复制过来 ,自定义vim配置文件生效路径为“~/.vimrc”,路径错误或者文件名错误都会导致自定义配置文件不生效。
3、自定义vim配置文件项:
syntax on 开启语法高亮
set autoindent 按回车后,下行缩进与上行一致
set tabstop=2 tab键代表的空格数
set number 显示行号
set cursorline 光标所在行高亮
set showmatch 光标遇到圆括号、方括号、大括号时,自动高亮对应的另一个圆括号、方括号和大括号
set hlsearch 搜索时,高亮显示匹配结果
set incsearch 输入搜索模式时,每输入一个字符,就自动跳到第一个匹配的结果
4、vim-plug插件管理安装
参考: https://www.cnblogs.com/ziwuxian/p/12922439.html
5、vim好用插件一览,看详细信息可在GitHub搜索Plug 后字符串中内容
Plug \'junegunn/vim-easy-align\'
Plug \'nsf/gocode\', { \'rtp\': \'vim\' }
Plug \'https://github.com/luofei614/vim-plug\', { \'dir\':\'~/.vim/my\'}
Plug \'AutoComplPop\'
Plug \'scrooloose/nerdtree\', { \'on\': \'NERDTreeToggle\' }
Plug \'Tagbar\'
Plug \'https://github.com/luofei614/Emmet.vim\'
Plug \'L9\'
Plug \'junegunn/fzf\', { \'dir\': \'~/.fzf\', \'do\': \'yes \| ./install\' }
Plug \'WebAPI.vim\'
Plug \'Gist.vim\'
Plug \'molokai\'
Plug \'Solarized\'
Plug \'PDV--phpDocumentor-for-Vim\'
Plug \'MattesGroeger/vim-bookmarks\'
Plug \'pangloss/vim-javascript\'
Plug \'https://github.com/othree/javascript-libraries-syntax.vim.git\'
Plug \'Mark\'
Plug \'prefixer.vim\'
Plug \'xml.vim\'
Plug \'https://github.com/kana/vim-fakeclip.git\'
Plug \'https://github.com/terryma/vim-multiple-cursors.git\'
Plug \'othree/html5.vim\'
Plug \'MarcWeber/vim-addon-mw-utils\'
Plug \'tomtom/tlib_vim\'
Plug \'garbas/vim-snipmate\'
Plug \'https://github.com/bonsaiben/bootstrap-snippets.git\'
Plug \'phpunit\'
Plug \'EasyMotion\'
Plug \'https://github.com/bling/vim-airline.git\'
Plug \'https://github.com/luofei614/vim-golang.git\'
Plug \'https://github.com/burnettk/vim-angular.git\'
Plug \'https://github.com/scrooloose/syntastic.git\'
Plug \'https://github.com/vim-scripts/cab.vim.git\'
Plug ‘fholgado/minibufexpl.vim’
Plug ‘vim-airline/vim-airline’
Plug ‘kien/ctrlp.vim’
Plug ‘ryanoasis/vim-devicons’
Plug ‘jistr/vim-nerdtree-tabs’
Plug ‘scrooloose/nerdtree’
Plug ‘Valloric/YouCompleteMe’
vim更多配置项请参考阮一峰vim配置入门: http://www.ruanyifeng.com/blog/2018/09/vimrc.html
插件一览参考: https://github.com/luofei614/vim-plug