diff options
| author | nsfisis <nsfisis@gmail.com> | 2021-11-27 15:24:51 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2021-11-27 15:24:51 +0900 |
| commit | 474be90087b1ebce3035fa5914165cdcb5ecd9f0 (patch) | |
| tree | ff6dbcca95ccb29a3196ad3f50afb31e07e61c9f | |
| parent | 62ef73a7cabb867612bdc779567f69607cbfb845 (diff) | |
| download | dotfiles-474be90087b1ebce3035fa5914165cdcb5ecd9f0.tar.gz dotfiles-474be90087b1ebce3035fa5914165cdcb5ecd9f0.tar.zst dotfiles-474be90087b1ebce3035fa5914165cdcb5ecd9f0.zip | |
neovim/vim: fix autosaving
| -rw-r--r-- | .config/vim/my/autoload/autosave.vim | 2 | ||||
| -rw-r--r-- | .config/vim/my/plugin/autosave.vim | 4 |
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 |
