aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorMarc Coquand <marc@baemingo.com>2023-05-18 12:48:43 -0500
committerMarc Coquand <marc@baemingo.com>2023-05-18 12:48:43 -0500
commit63ff0bedaa55a6b2957e958ee727bd524b280143 (patch)
tree9bd2f58f5e78cd6d44903c240d3cc042233028e4 /plugin
downloadBufferBrowser-63ff0bedaa55a6b2957e958ee727bd524b280143.tar.gz
BufferBrowser-63ff0bedaa55a6b2957e958ee727bd524b280143.tar.bz2
BufferBrowser-63ff0bedaa55a6b2957e958ee727bd524b280143.zip
Initial commit
'
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