From a0d367edb7a5a6f193a03b70f828079217726aa7 Mon Sep 17 00:00:00 2001 From: jdhao Date: Mon, 29 Apr 2019 22:51:57 +0800 Subject: [PATCH] Update init.vim --- init.vim | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/init.vim b/init.vim index 5269074..02fe7ab 100644 --- a/init.vim +++ b/init.vim @@ -20,7 +20,7 @@ " not recommend downloading this file and replace your own init.vim. Good " configurations are built over time and take your time to polish. " Author: jdhao (jdhao@hotmail.com). Blog: https://jdhao.github.io -" Update: 2019-04-26 17:07:12+0800 +" Update: 2019-04-29 21:07:02+0800 "}} "{{ License: MIT License @@ -342,6 +342,9 @@ set matchpairs+=<:>,「:」 " popup menu settings set pumheight=15 " maximum number of items to show in popup menu set pumblend=15 " pesudo-blend effect for popup menu + +" tilde ~ is an operator (thus must be followed by motion like `c` or `d`) +set tildeop "} "{ Custom key mappings @@ -398,8 +401,8 @@ inoremap " insert a blank line below or above current line (do not move the cursor) " see https://stackoverflow.com/a/16136133/6064933 -nnoremap oo m`o`` -nnoremap OO m`O`` +nnoremap oo @='m`o``' +nnoremap OO @='m`O``' " insert a space after current character nnoremap ah @@ -481,16 +484,21 @@ nnoremap :%s/\v " change current working locally to where the opened file resides " see https://vim.fandom.com/wiki/Set_working_directory_to_the_current_file -nnoremap cd :lcd %:p:h:pwd +nnoremap cd :lcd %:p:h:pwd " reduce indent level in insert mode with shift+tab inoremap < -" tilde ~ is an operator (thus must be followed by motion like `c` or `d`) -set tildeop +" toggle spell checking (autosave does not play well with z=, so we disable it +" when we are doing spell checking) +nnoremap :set spell! :AutoSaveToggle +inoremap :set spell! :AutoSaveToggle + +" spell checking related mapping, take from http://tinyurl.com/y5gwgs3d +nnoremap ]s1z= "} "{ Auto commands @@ -663,7 +671,7 @@ Plug 'deathlyfrantic/deoplete-spell' Plug 'davidhalter/jedi-vim', { 'for': 'python' } " Python syntax highlighting -" Plug 'vim-python/python-syntax', { 'for': 'python' } +Plug 'vim-python/python-syntax', { 'for': 'python' } " python syntax highlighting and more Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins', 'for': 'python' } @@ -1075,11 +1083,11 @@ let g:jedi#show_call_signatures = '2' """""""""""""""""""""""""python-syntax highlight settings""""""""""""""""""" -" " don't highlight space error, really annoying!!!!! -" let g:python_highlight_space_errors = 0 +" highlight all +let g:python_highlight_all = 1 -" " highlight all -" let g:python_highlight_all = 1 +" don't highlight space error, really annoying!!!!! +let g:python_highlight_space_errors = 0 """""""""""""""""""""""""" semshi settings """"""""""""""""""""""""""""""" @@ -1810,4 +1818,4 @@ endif " - https://github.com/gkapfham/dotfiles/blob/master/.vimrc " The ascii art on the frontpage is generated using http://tinyurl.com/y6szckgd -"} +"} \ No newline at end of file