diff --git a/vimrc b/vimrc index 7d2cda4..a916782 100644 --- a/vimrc +++ b/vimrc @@ -15,6 +15,8 @@ set shiftround set tabstop=2 set expandtab set smarttab +set splitbelow +set splitright set encoding=utf-8 set nocompatible set t_Co=256 @@ -56,6 +58,7 @@ set balloonevalterm set scrolloff=5 set dict=/usr/share/dict/words set shortmess+=I +set pastetoggle= " See :help thesaurus set thesaurus=$HOME/Documents/thesaurus/thesaurus_pkg/thesaurus.txt @@ -63,9 +66,13 @@ set thesaurus=$HOME/Documents/thesaurus/thesaurus_pkg/thesaurus.txt colorscheme flattened_dark set background=dark -" Automatically load/save views on files: -au BufWinLeave *.* mkview -au BufWinEnter *.* silent loadview +" Automatically load/save views on files. +" https://vi.stackexchange.com/posts/13874/revisions +augroup AutoSaveFolds + autocmd! + autocmd BufWinLeave,BufLeave,BufWritePost,BufHidden,QuitPre ?* nested silent! mkview! + autocmd BufWinEnter ?* silent! loadview +augroup end " Key mappings: nnoremap j gj @@ -79,8 +86,6 @@ map :tabnew " Select just-pasted text: nnoremap 0 `[v`] nnoremap Q @@ -map p :set pastea -map P :set nopaste function! ToggleQuickFix()