From 17975ffc46cc18ca49304b4780f20a5b0b91e4ca Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 27 Nov 2021 21:59:34 +0900 Subject: vim: minimize .vimrc --- .config/nvim/my/plugin/autosave.vim | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .config/nvim/my/plugin/autosave.vim (limited to '.config/nvim/my/plugin/autosave.vim') diff --git a/.config/nvim/my/plugin/autosave.vim b/.config/nvim/my/plugin/autosave.vim new file mode 100644 index 0000000..6339dcb --- /dev/null +++ b/.config/nvim/my/plugin/autosave.vim @@ -0,0 +1,29 @@ +scriptencoding utf-8 + +if exists('g:loaded_autosave') + finish +endif + + + +command! -bar + \ AutosaveEnable + \ call autosave#enable() + + +command! -bar + \ AutosaveDisable + \ call autosave#disable() + + +command! -bar + \ AutosaveToggle + \ if exists('b:autosave_timer') | + \ call autosave#disable() | + \ else | + \ call autosave#enable() | + \ endif + + + +let g:loaded_autosave = 1 -- cgit v1.3.1-4-g156e