From 31709000e699fab4086d5a7dddfcdb1b63460bc3 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 22 Feb 2019 11:29:39 +1300 Subject: [PATCH 1/1] encapsulate local settings in cpo --- .vimrc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.vimrc b/.vimrc index 3ae5792..91a3b66 100644 --- a/.vimrc +++ b/.vimrc @@ -1441,6 +1441,10 @@ set vi=<1000,'1000,\"1000,:100,/100,@100,f1,%,!,h,n$VARDIR/vim/viminfo " set to "msg" to see all error messages " set debug= +if &cp | set nocp | endif +let s:cpo_save=&cpo +set cpo&vim + filetype plugin indent on syntax on colorscheme madduck @@ -1466,10 +1470,6 @@ augroup tsperrorinsert autocmd InsertLeave * match Error /\s\+$/ augroup end -if &cp | set nocp | endif -let s:cpo_save=&cpo -set cpo&vim - " treat wrapped lines normally nnoremap k gk nnoremap gk @@ -1534,6 +1534,8 @@ iab mk Martin Krafft iab mfk Martin F. Krafft iab addr Hanfstaenglstraße 15 D–80638 München +let g:is_posix = 1 + let &cpo=s:cpo_save unlet s:cpo_save @@ -1541,5 +1543,3 @@ source $HOME/.vim/macros/table.vim let g:SuperTabMappingForward = '' let g:SuperTabMappingBackward = '' - -let g:is_posix = 1 -- 2.39.5