From 6d3ba881c40a77ab1c76c34ec6e1ca7f2f65f386 Mon Sep 17 00:00:00 2001 From: Stefan Liebl Date: Thu, 21 Apr 2022 19:42:10 +0200 Subject: [PATCH] fix nomodifiable setting --- vimfiles.stefan/vimrc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/vimfiles.stefan/vimrc b/vimfiles.stefan/vimrc index d344251..b2d06b1 100644 --- a/vimfiles.stefan/vimrc +++ b/vimfiles.stefan/vimrc @@ -230,12 +230,7 @@ set patchmode= " \ endif " set nomodifiable on writeprotected files -autocmd BufReadPost * - \ if &readonly == 1 | - \ execute ':set nomodifiable' | - \ else | - \ execute ':set modifiable' | - \ endif +autocmd BufReadPost * if &readonly == 1 | setlocal nomodifiable | endif " read all files on got of focus " autocmd FocusGained * execute " save all files on loss of focus