X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/1bc1c4ffd4c21d48663aaa66c757a99819e4c834..516f716351cec888c353c961e2934d61d2814891:/vim/vimrc diff --git a/vim/vimrc b/vim/vimrc index 33281c9..d4e8e48 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -158,6 +158,9 @@ set foldlevelstart=0 " value for 'foldlevel' when starting to edit a " save and restore folds set viewoptions=folds,cursor " don't save local options +" diff mode {{{2 +set diffopt=filler,vertical + " reading and writing files {{{2 set modeline " read modelines set modelines=2 " only check first/last 2 lines @@ -308,6 +311,10 @@ inoremap A cnoremap cnoremap +" proper movement when lines are wrapped +noremap j gj +noremap k gk + " disable arrows noremap noremap @@ -330,7 +337,7 @@ cnoremap nnoremap zx zMzxzz15 " edit vimrc in new tab -nmap ev :tabedit $MYVIMRC +nmap ev :tabedit $MYVIMRC:lcd %:p:h map :ls:b @@ -396,7 +403,7 @@ autocmd BufReadPost fugitive://* set bufhidden=delete nnoremap gs :Gstatus nnoremap gd :Gdiff nnoremap gc :tab Gcommit -v -nnoremap gw :Gwrite +nnoremap ga :Gwrite " NERDTree {{{2 " open/close NERDTree with \e