aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMarc Coquand <marc@baemingo.com>2023-06-13 07:15:53 +0200
committerMarc Coquand <marc@baemingo.com>2023-06-13 07:15:53 +0200
commit88c3399611eddc12d04f81c5bff09b3fb5e6250d (patch)
tree8c1d82ca5e2bd57dfcd47352fe54ecf32a8365d7 /README.md
parent2da7fcd41ceb9ea8ac42c4965547105ab5cbaf4c (diff)
downloadBufferBrowser-88c3399611eddc12d04f81c5bff09b3fb5e6250d.tar.gz
BufferBrowser-88c3399611eddc12d04f81c5bff09b3fb5e6250d.tar.bz2
BufferBrowser-88c3399611eddc12d04f81c5bff09b3fb5e6250d.zip
Update readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md22
1 files changed, 11 insertions, 11 deletions
diff --git a/README.md b/README.md
index 3508260..9e7046e 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# NVIM Buffer Browse
+# NVIM Buffer Browse
`:b#` on steroids. Browse your buffers like you browse history in a browser.
@@ -11,7 +11,7 @@ opened, not by history. `:b#`, `<Ctrl-6>` and `<Ctrl-O>` works only
assuming you didn't navigate around further.
I wanted to be able to browse buffers in a way that is similar to how you
-browse tabs in a browser.
+browse tabs in a browser.
## Usage
@@ -19,9 +19,10 @@ This plugin implements two functions: `require('buffer-browser').next()` and
`require('buffer-browser').prev()`.
You can easily map these to whatever you want. Here is an example `init.lua`:
+
```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 []]"})
+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 []]"})
```
Use these to navigate your buffer history in the order that you opened them.
@@ -32,13 +33,13 @@ If a split has been performed, the new split will not preserve any of the previo
## Installation
-Install through any of your favorite plugin managers.
+Install through any of your favorite plugin managers.
-### [lazy](https://www.lazyvim.org).
+### [lazy](https://www.lazyvim.org).
Add the following line in your `require('lazy').setup` call
-```lua
+```lua
{
'https://git.sr.ht/~marcc/BufferBrowser',
}
@@ -50,7 +51,7 @@ Then run somewhere in your init.lua run the setup:
require('buffer_browser').setup()
```
-### Configuration
+### Configuration
You can configure the `filetype_filters` by passing a table to the `setup`
function. This is the default config:
@@ -68,14 +69,13 @@ This can be used to filter out buffers you do not want in the history.
By default, BufferBrowser will remember Netrw buffers. To immediately close
netrw after you have opened a file, you can add to init.lua
-`vim.g.netrw_fastbrowse=0`
+`vim.g.netrw_fastbrowse=0`
This will remove the netrw buffer and wipe it from the browser history when
you open a new file.
-## Credits
+## Credits
The plugin is mostly a copy of
[ton/vim-bufsurf](https://github.com/ton/vim-bufsurf), but rewritten in Lua and
adds the ability to filter unwanted filetypes.
-