aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2021-11-27 15:24:51 +0900
committernsfisis <nsfisis@gmail.com>2021-11-27 15:24:51 +0900
commit474be90087b1ebce3035fa5914165cdcb5ecd9f0 (patch)
treeff6dbcca95ccb29a3196ad3f50afb31e07e61c9f
parent62ef73a7cabb867612bdc779567f69607cbfb845 (diff)
downloaddotfiles-474be90087b1ebce3035fa5914165cdcb5ecd9f0.tar.gz
dotfiles-474be90087b1ebce3035fa5914165cdcb5ecd9f0.tar.zst
dotfiles-474be90087b1ebce3035fa5914165cdcb5ecd9f0.zip
neovim/vim: fix autosaving
-rw-r--r--.config/vim/my/autoload/autosave.vim2
-rw-r--r--.config/vim/my/plugin/autosave.vim4
2 files changed, 3 insertions, 3 deletions
diff --git a/.config/vim/my/autoload/autosave.vim b/.config/vim/my/autoload/autosave.vim
index 0c34d0e..2773460 100644
--- a/.config/vim/my/autoload/autosave.vim
+++ b/.config/vim/my/autoload/autosave.vim
@@ -43,7 +43,7 @@ endfunction
function! autosave#enable() abort
- if has('+timers')
+ if !has('timers') && !has('nvim')
echohl Error
echo "Feature '+timers' not available."
echohl None
diff --git a/.config/vim/my/plugin/autosave.vim b/.config/vim/my/plugin/autosave.vim
index 2548609..6339dcb 100644
--- a/.config/vim/my/plugin/autosave.vim
+++ b/.config/vim/my/plugin/autosave.vim
@@ -19,9 +19,9 @@ command! -bar
command! -bar
\ AutosaveToggle
\ if exists('b:autosave_timer') |
- \ call autosave#enable() |
- \ else |
\ call autosave#disable() |
+ \ else |
+ \ call autosave#enable() |
\ endif