aboutsummaryrefslogtreecommitdiffhomepage
path: root/.vim/my/plugin
diff options
context:
space:
mode:
Diffstat (limited to '.vim/my/plugin')
-rw-r--r--.vim/my/plugin/autosave.vim29
1 files changed, 29 insertions, 0 deletions
diff --git a/.vim/my/plugin/autosave.vim b/.vim/my/plugin/autosave.vim
new file mode 100644
index 0000000..2548609
--- /dev/null
+++ b/.vim/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#enable() |
+ \ else |
+ \ call autosave#disable() |
+ \ endif
+
+
+
+let g:loaded_autosave = 1