aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-03 22:46:23 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-03 22:46:23 +1200
commit6c107a31ace12fb2fac9cb41c4aac20d632e67dc (patch)
treeb9b88c146c86d397c0967ebfa183b834036f7241 /plugin
parentAdd files as they stand (diff)
downloadvim-keep-position-6c107a31ace12fb2fac9cb41c4aac20d632e67dc.tar.gz
vim-keep-position-6c107a31ace12fb2fac9cb41c4aac20d632e67dc.zip
Add comments and documentation
Diffstat (limited to 'plugin')
-rw-r--r--plugin/keep_position.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugin/keep_position.vim b/plugin/keep_position.vim
index 06a23ec..1389bcf 100644
--- a/plugin/keep_position.vim
+++ b/plugin/keep_position.vim
@@ -1,2 +1,15 @@
+"
+" keep_position.vim: User command wrapper to preserve cursor position and
+" buffer view.
+"
+" Author: Tom Ryder <tom@sanctum.geek.nz>
+" License: Same as Vim itself
+"
+if exists('loaded_keep_position') || &compatible || v:version < 700
+ finish
+endif
+let loaded_keep_position = 1
+
+" User command definition refers to autoloaded function
command! -nargs=+ -complete=command KeepPosition
\ call keep_position#(<q-args>)