diff options
author | Marc Coquand <marc@baemingo.com> | 2023-05-19 14:25:31 -0500 |
---|---|---|
committer | Marc Coquand <marc@baemingo.com> | 2023-05-19 14:25:31 -0500 |
commit | e406288adc8a70197730569c4da3e8c61d24e47d (patch) | |
tree | 4a3763cf19af65d9d90a2e54cbf0ece2aa37ce2e /doc | |
parent | 63ff0bedaa55a6b2957e958ee727bd524b280143 (diff) | |
download | BufferBrowser-e406288adc8a70197730569c4da3e8c61d24e47d.tar.gz BufferBrowser-e406288adc8a70197730569c4da3e8c61d24e47d.tar.bz2 BufferBrowser-e406288adc8a70197730569c4da3e8c61d24e47d.zip |
Initial version
Diffstat (limited to 'doc')
-rw-r--r-- | doc/BufferBrowser.txt | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/BufferBrowser.txt b/doc/BufferBrowser.txt new file mode 100644 index 0000000..d6bc2f3 --- /dev/null +++ b/doc/BufferBrowser.txt @@ -0,0 +1,45 @@ +*BufferBrowser.txt* `:b#` on steroids. Browse your buffers like you browse history in a browser. *BufferBrowser* + +This plugin implements two functions: + require('buffer-browser').next() + require('buffer-browser').prev() + +You can easily map these to whatever you want. Here is an example `init.lua`: + vim.api.nvim_set_keymap('n', '<leader>b[', require("buffer_browser").next(), {desc = "Next [B]uffer [[]"}) + vim.api.nvim_set_keymap('n', '<leader>b]', require("buffer_browser").prev(), {desc = "Previous [B]uffer []]"}) + +INSTALLATION + +Install through any of your favorite plugin managers. + +### [lazy](https://www.lazyvim.org). +Make sure to run the setup function. For example with lazy: + + { + 'https://git.sr.ht/~marcc/BufferBrowser', + setup = function() + require('buffer_browser').setup() + end + } + + +CONFIGURATION + +You can configure the filetype_filters by passing a table to the setup function. For example with default config: + + require('buffer-browser').setup({ + -- '' + 'netrw' is used to filter out netrw. + filetype_filters = ['', 'netrw', 'gitcommit', 'TelescopePrompt'] + }) + +This can be used to filter out buffers you do not want in the history. If your +current buffer ends with, for example netrw, it will be filtered out and not +available in the history + +LIMITATIONS + +To filter out netrw, we need to also filter out '', as the filetype +occassionally gets set to that by netrw (not sure why...). This means files +without filetype are filtered out. + + |