aboutsummaryrefslogtreecommitdiff
path: root/doc/BufferBrowser.txt
blob: dd4c305d032ecb5168aa9e8413822c9bba0113b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
*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 []]"})


CONFIGURATION 

You can configure the `filetype_filters` by passing a table to the `setup`
function. This is the default config:

  require('buffer-browser').setup({
      filetype_filters = {'gitcommit', 'TelescopePrompt'}
  })

This can be used to filter out buffers you do not want in the history.

REMOVING NETRW BUFFERS

By default, BufferBrowser will remember Netrw buffers. To immediately close
netrw after you have opened a file, you can add to init.lua the following:

  vim.g.netrw_fastbrowse =0

This will remove the netrw buffer and wipe it from the browser history when
you open a new file.