From facd424d4850a987eebad60625cddade635854dc Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Tue, 13 Jun 2023 07:19:49 +0200 Subject: Update readme --- README.md | 4 ++-- doc/BufferBrowser.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9e7046e..1907514 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,8 @@ This plugin implements two functions: `require('buffer-browser').next()` and You can easily map these to whatever you want. Here is an example `init.lua`: ```lua -vim.api.nvim_set_keymap('n', 'b[', require("buffer_browser").next, {desc = "Next [B]uffer [[]"}) -vim.api.nvim_set_keymap('n', 'b]', require("buffer_browser").prev, {desc = "Previous [B]uffer []]"}) +vim.keymap.set('n', 'b[', require("buffer_browser").next, {desc = "Next [B]uffer [[]"}) +vim.keymap.set('n', 'b]', require("buffer_browser").prev, {desc = "Previous [B]uffer []]"}) ``` Use these to navigate your buffer history in the order that you opened them. diff --git a/doc/BufferBrowser.txt b/doc/BufferBrowser.txt index dd4c305..f7b633a 100644 --- a/doc/BufferBrowser.txt +++ b/doc/BufferBrowser.txt @@ -5,8 +5,8 @@ This plugin implements two functions: 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', 'b[', require("buffer_browser").next(), {desc = "Next [B]uffer [[]"}) - vim.api.nvim_set_keymap('n', 'b]', require("buffer_browser").prev(), {desc = "Previous [B]uffer []]"}) + vim.keymap.set('n', 'b[', require("buffer_browser").next, {desc = "Next [B]uffer [[]"}) + vim.keymap.set('n', 'b]', require("buffer_browser").prev, {desc = "Previous [B]uffer []]"}) CONFIGURATION -- cgit v1.2.3