From 6cd24ad14f105d08d4519c25c652c03bbcc7a653 Mon Sep 17 00:00:00 2001 From: sev Date: Thu, 5 Dec 2024 15:06:14 -0600 Subject: [PATCH] vimrc: suda settings can be buffer-local now --- etc/vim/.vimrc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/vim/.vimrc b/etc/vim/.vimrc index 9e1a6cd..b59d19e 100644 --- a/etc/vim/.vimrc +++ b/etc/vim/.vimrc @@ -184,21 +184,21 @@ endif " re-enable backup, swap, undo for suda buffers that we can read " https://github.com/lambdalisue/vim-suda/issues/25 function s:SudaSettingsSave() - let g:sev_suda_backup = &backup - let g:sev_suda_swapfile = &swapfile - let g:sev_suda_undofile = &undofile + let b:sev_suda_backup = &backup + let b:sev_suda_swapfile = &swapfile + let b:sev_suda_undofile = &undofile endfunction function s:SudaSettingsRestore() if filereadable(expand('')[7:]) - if exists('g:sev_suda_backup') && g:sev_suda_backup + if exists('b:sev_suda_backup') && b:sev_suda_backup " XXX: suda.vim uses setlocal for this, even though it's global... " https://github.com/lambdalisue/vim-suda/issues/85 setlocal backup endif - if exists('g:sev_suda_swapfile') && g:sev_suda_swapfile + if exists('b:sev_suda_swapfile') && b:sev_suda_swapfile setlocal swapfile endif - if exists('g:sev_suda_undofile') && g:sev_suda_undofile + if exists('b:sev_suda_undofile') && b:sev_suda_undofile setlocal undofile endif endif -- 2.48.1