Merge pull request #200 from Titubery/master

Add support to custom plugs and read mode
This commit is contained in:
chxuan 2019-10-25 20:40:52 +08:00 committed by GitHub
commit 0802f99024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 2 deletions

9
.vimrc
View File

@ -154,7 +154,12 @@ Plug 'terryma/vim-smooth-scroll'
Plug 'rhysd/clever-f.vim'
Plug 'vim-scripts/indentpython.vim'
call plug#end()
" 自定义插件
if filereadable(expand($HOME . '/.vimrc.plugs'))
source $HOME/.vimrc.plugs
endif
call plug#end()
" load vim default plugin
runtime macros/matchit.vim
@ -354,7 +359,7 @@ nnoremap <leader>gg :GV?<cr>
" indentLine 默认不启用
let g:indentLine_enabled = 0
" 个性化
" 自定义设置
if filereadable(expand($HOME . '/.vimrc.local'))
source $HOME/.vimrc.local
endif

View File

@ -3,3 +3,9 @@
" 启动代码对齐线
" let g:indentLine_enabled = 1
" for test
" let g:rainbow_active = 1
" vim read mode
" autocmd BufRead * let &l:modifiable = !&readonly

3
.vimrc.plugs Normal file
View File

@ -0,0 +1,3 @@
" for test
" Plug 'sjl/badwolf'
" Plug 'luochen1990/rainbow'

View File

@ -334,3 +334,4 @@
| ------- | ----- |
| `vim -u NONE -N` | 开启vim时不加载vimrc文件 |
| `vimdiff file1 file2` | 显示文件差异 |
| `vim -R filename` | 以只读方式打开(阅读模式) |