aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config/nvim/plugin/autosave.vim
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2021-12-04 13:09:34 +0900
committernsfisis <nsfisis@gmail.com>2021-12-04 15:38:47 +0900
commit7482bb03a7943a3fd9049c7ba61033b42387fac2 (patch)
treec5dcb4a27b723ca6fc14a22366e4d2b9477c694a /.config/nvim/plugin/autosave.vim
parent12f18a076f79470941f7ed54ac2de7effcbff740 (diff)
downloaddotfiles-7482bb03a7943a3fd9049c7ba61033b42387fac2.tar.gz
dotfiles-7482bb03a7943a3fd9049c7ba61033b42387fac2.tar.zst
dotfiles-7482bb03a7943a3fd9049c7ba61033b42387fac2.zip
neovim: refactor
Diffstat (limited to '.config/nvim/plugin/autosave.vim')
-rw-r--r--.config/nvim/plugin/autosave.vim14
1 files changed, 3 insertions, 11 deletions
diff --git a/.config/nvim/plugin/autosave.vim b/.config/nvim/plugin/autosave.vim
index 6339dcb..ab8a227 100644
--- a/.config/nvim/plugin/autosave.vim
+++ b/.config/nvim/plugin/autosave.vim
@@ -5,25 +5,17 @@ if exists('g:loaded_autosave')
endif
-
command! -bar
\ AutosaveEnable
- \ call autosave#enable()
-
+ \ lua require('autosave').enable()
command! -bar
\ AutosaveDisable
- \ call autosave#disable()
-
+ \ lua require('autosave').disable()
command! -bar
\ AutosaveToggle
- \ if exists('b:autosave_timer') |
- \ call autosave#disable() |
- \ else |
- \ call autosave#enable() |
- \ endif
-
+ \ lua require('autosave').toggle()
let g:loaded_autosave = 1