diff options
author | Camil Staps | 2021-06-13 09:50:28 +0200 |
---|---|---|
committer | Camil Staps | 2021-06-13 09:50:28 +0200 |
commit | d0e5dda9683f93f311f27508fb5bd42892554391 (patch) | |
tree | 677d3baa54c3662b4568f933a113b8828a354087 /vim | |
parent | Add neovim config to use vimrc (diff) |
Fix vimrc; redefine functions and commands in case the file is resourced
Diffstat (limited to 'vim')
-rw-r--r-- | vim/.vimrc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -123,22 +123,22 @@ endif map <LocalLeader>s :syn sync fromstart<CR> -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() |