From 630c85719fb52e3edb9c98a04a716d956223c9d0 Mon Sep 17 00:00:00 2001 From: johannst Date: Wed, 19 Oct 2016 16:21:52 +0200 Subject: added vi movement in bash; vim changed keymaps to be non-recursive and changed layout of quickfix window, added auto save/restore (but currently disabled) --- .vimrc | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 4ef1ef0..9a42a8e 100644 --- a/.vimrc +++ b/.vimrc @@ -61,6 +61,9 @@ set nocompatible " make vim less vi "}}} +"autocmd VimEnter * silent! source .vim_last_session +"autocmd QuitPre * mksession! .vim_last_session + function! TriggerSCons(arg_string) let base_cmd = "scons -u " let &makeprg=base_cmd.a:arg_string @@ -100,6 +103,7 @@ set backspace=2 " had some issues with BS on empty line didn't del set noautowrite " never write a file unless I request it. set noautowriteall " NEVER. set noautoread " don't automatically re-read changed files. +set nowrap " Line/Column settings set number " Display line numbers @@ -152,36 +156,39 @@ set noerrorbells set novisualbell " automatically open Quickfix -autocmd QuickFixCmdPost [^l]* nested cwindow -autocmd QuickFixCmdPost l* nested lwindow +autocmd QuickFixCmdPost [^l]* nested botright cwindow +autocmd QuickFixCmdPost l* nested botright lwindow "{{{ Keymaps + " unset . +" noremap . " set leader key "execute "set =\es" let mapleader=";" " re-source .vimrc - map v :source ~/.vimrc + nnoremap v :source ~/.vimrc "remap esc button - imap jj +" inoremap + inoremap jj " quit buffer noremap q :bd " re-adjust indentation - map f mzgg=G`z + nnoremap f mzgg=G`z " navigate between different splits - map j - map k - map l - map h - map j - map k - map l - map h + nnoremap j + nnoremap k + nnoremap l + nnoremap h + nnoremap j + nnoremap k + nnoremap l + nnoremap h " resize splits "map 5- @@ -210,7 +217,7 @@ autocmd QuickFixCmdPost l* nested lwindow " add a marker fold snippet (for C/C++) nnoremap o//{{{ o//}}}A - imap + inoremap o//{{{ o//}}}A " only works with v-block (not v-line) vnoremap VV''>o//}}}'<A -- cgit v1.2.3