From 21a7eddf9f57f6bd272d620c2ded1654707a74fc Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Tue, 12 Jan 2021 13:49:38 +0100 Subject: [PATCH] Update vimrc --- vimrc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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()