From d0e5dda9683f93f311f27508fb5bd42892554391 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sun, 13 Jun 2021 09:50:28 +0200 Subject: Fix vimrc; redefine functions and commands in case the file is resourced --- vim/.vimrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vim') diff --git a/vim/.vimrc b/vim/.vimrc index ceef212..f3aed99 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -123,22 +123,22 @@ endif map s :syn sync fromstart -function s:enable_automatic_background() +function! s:enable_automatic_background() augroup bg autocmd bg BufEnter * set bg=dark | call s:detect_terminal_line_border() autocmd bg BufEnter *.bib,*.md,*.tex,*.txt set bg=light | call s:detect_terminal_line_border() augroup END endfunction -function s:disable_automatic_background() +function! s:disable_automatic_background() augroup bg autocmd! bg augroup END augroup! bg endfunction -command AutomaticBackgroundEnable call s:enable_automatic_background() -command AutomaticBackgroundDisable call s:disable_automatic_background() +command! AutomaticBackgroundEnable call s:enable_automatic_background() +command! AutomaticBackgroundDisable call s:disable_automatic_background() call s:enable_automatic_background() -- cgit v1.2.3