mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Simplify init.vim
This commit is contained in:
parent
2ad5add811
commit
7974859a75
36
init.vim
36
init.vim
@ -20,7 +20,7 @@
|
|||||||
" not recommend downloading this file and replace your own init.vim. Good
|
" not recommend downloading this file and replace your own init.vim. Good
|
||||||
" configurations are built over time and take your time to polish.
|
" configurations are built over time and take your time to polish.
|
||||||
" Author: jdhao (jdhao@hotmail.com). Blog: https://jdhao.github.io
|
" Author: jdhao (jdhao@hotmail.com). Blog: https://jdhao.github.io
|
||||||
" Update: 2019-05-11 19:46:55+0800
|
" Update: 2019-05-16 20:09:18+0800
|
||||||
"}}
|
"}}
|
||||||
|
|
||||||
"{{ License: MIT License
|
"{{ License: MIT License
|
||||||
@ -310,15 +310,14 @@ set virtualedit=block " virtual edit is useful for visual block edit
|
|||||||
set formatoptions+=mM
|
set formatoptions+=mM
|
||||||
|
|
||||||
" dictionary files for different systems
|
" dictionary files for different systems
|
||||||
let $MY_DICT = stdpath('config') . '/dict/words'
|
let g:MY_DICT = stdpath('config') . '/dict/words'
|
||||||
set dictionary+=$MY_DICT
|
let &dictionary = &dictionary . ',' . g:MY_DICT
|
||||||
set spelllang=en,cjk " spell languages
|
set spelllang=en,cjk " spell languages
|
||||||
|
|
||||||
" tilde ~ is an operator (thus must be followed by motion like `c` or `d`)
|
" tilde ~ is an operator (thus must be followed by motions like `e` or `w`)
|
||||||
set tildeop
|
set tildeop
|
||||||
|
|
||||||
" set pyx version to use python3 by default
|
set pyxversion=3 " set pyx version to use python3 by default
|
||||||
set pyxversion=3
|
|
||||||
"}
|
"}
|
||||||
|
|
||||||
"{ Custom key mappings
|
"{ Custom key mappings
|
||||||
@ -560,6 +559,14 @@ augroup vim_script_setting
|
|||||||
" see `:h K` and https://bre.is/wC3Ih-26u
|
" see `:h K` and https://bre.is/wC3Ih-26u
|
||||||
autocmd FileType vim setlocal keywordprg=:help
|
autocmd FileType vim setlocal keywordprg=:help
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
" display a message when the current file is not utf-8 encoded
|
||||||
|
" note that we need to use `unsilent` command here because of this issue:
|
||||||
|
" https://github.com/vim/vim/issues/4379
|
||||||
|
augroup non_utf8_file_warn
|
||||||
|
autocmd!
|
||||||
|
autocmd BufRead * if &fileencoding != 'utf-8' |unsilent echomsg 'file not in utf-8 format!' | endif
|
||||||
|
augroup END
|
||||||
"}
|
"}
|
||||||
|
|
||||||
"{ Plugin install part
|
"{ Plugin install part
|
||||||
@ -651,7 +658,7 @@ Plug 'mhinz/vim-grepper', { 'on': ['Grepper', '<plug>(GrepperOperator)'] }
|
|||||||
|
|
||||||
" file search, tag search and more
|
" file search, tag search and more
|
||||||
if has('win32')
|
if has('win32')
|
||||||
Plug 'Yggdroot/LeaderF', { 'do': '.\install.bat' }
|
Plug 'Yggdroot/LeaderF'
|
||||||
else
|
else
|
||||||
Plug 'Yggdroot/LeaderF', { 'do': './install.sh' }
|
Plug 'Yggdroot/LeaderF', { 'do': './install.sh' }
|
||||||
endif
|
endif
|
||||||
@ -879,7 +886,6 @@ Plug 'andymass/vim-matchup'
|
|||||||
Plug 'yuttie/comfortable-motion.vim'
|
Plug 'yuttie/comfortable-motion.vim'
|
||||||
|
|
||||||
Plug 'tpope/vim-scriptease'
|
Plug 'tpope/vim-scriptease'
|
||||||
Plug 'raghur/vim-ghost', {'do': ':GhostInstall'}
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
"}}
|
"}}
|
||||||
"}
|
"}
|
||||||
@ -992,8 +998,8 @@ let g:deoplete#sources#jedi#ignore_errors = 1
|
|||||||
" disable autocompletion, because I use deoplete for auto-completion
|
" disable autocompletion, because I use deoplete for auto-completion
|
||||||
let g:jedi#completions_enabled = 0
|
let g:jedi#completions_enabled = 0
|
||||||
|
|
||||||
" show function call signature
|
" whether to show function call signature
|
||||||
let g:jedi#show_call_signatures = '1'
|
let g:jedi#show_call_signatures = '0'
|
||||||
|
|
||||||
"""""""""""""""""""""""""" semshi settings """""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""" semshi settings """""""""""""""""""""""""""""""
|
||||||
" do not highlight variable under cursor, it is distracting
|
" do not highlight variable under cursor, it is distracting
|
||||||
@ -1001,6 +1007,10 @@ let g:semshi#mark_selected_nodes=0
|
|||||||
|
|
||||||
" do not show error sign since neomake is specicialized for that
|
" do not show error sign since neomake is specicialized for that
|
||||||
let g:semshi#error_sign=v:false
|
let g:semshi#error_sign=v:false
|
||||||
|
|
||||||
|
"""""""""""""""""""""""""" simpylFold settings """""""""""""""""""""""""""""""
|
||||||
|
" do not fold docstring
|
||||||
|
let g:SimpylFold_fold_docstring = 0
|
||||||
"}}
|
"}}
|
||||||
|
|
||||||
"{{ search related
|
"{{ search related
|
||||||
@ -1282,8 +1292,8 @@ augroup goyo_work_with_limelight
|
|||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
"""""""""""""""""""""""""vim-pandoc-syntax settings"""""""""""""""""""""""""
|
"""""""""""""""""""""""""vim-pandoc-syntax settings"""""""""""""""""""""""""
|
||||||
" do not conceal urls (seems does not work)
|
" whether to conceal urls (seems does not work)
|
||||||
let g:pandoc#syntax#conceal#urls = 1
|
let g:pandoc#syntax#conceal#urls = 0
|
||||||
|
|
||||||
" use pandoc-syntax for markdown files, it will disable conceal feature for
|
" use pandoc-syntax for markdown files, it will disable conceal feature for
|
||||||
" links, use it at your own risk
|
" links, use it at your own risk
|
||||||
@ -1627,4 +1637,4 @@ endif
|
|||||||
" - https://github.com/gkapfham/dotfiles/blob/master/.vimrc
|
" - https://github.com/gkapfham/dotfiles/blob/master/.vimrc
|
||||||
|
|
||||||
" The ascii art on the frontpage is generated using http://tinyurl.com/y6szckgd
|
" The ascii art on the frontpage is generated using http://tinyurl.com/y6szckgd
|
||||||
"}
|
"}
|
||||||
Loading…
x
Reference in New Issue
Block a user