aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/buffer-browser.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugin/buffer-browser.vim b/plugin/buffer-browser.vim
new file mode 100644
index 0000000..dfdb366
--- /dev/null
+++ b/plugin/buffer-browser.vim
@@ -0,0 +1,13 @@
+if exists('g:loaded_buffer_browser') | finish | endif " prevent loading file twice
+
+let s:save_cpo = &cpo " save user coptions
+set cpo&vim " reset them to defaults
+
+" command to run our plugin
+command! BufferBrowserNext lua require'buffer_browser'.next()
+command! BufferBrowserPrevious lua require'buffer_browser'.prev()
+
+let &cpo = s:save_cpo " and restore after
+unlet s:save_cpo
+
+let g:loaded_whid = 1