Space
key as the default leader. If you want to change it, you can use the better-vim.lua
file.
To change your leader from Space
to ,
you can update your better-vim.lua
to something like:
lua
and hooks.after_setup
hook in better-vim.lua
.better-vim.lua
module. Let’s see how to create a mapping to open the file explorer using ctrl + b
:
4
we define the combination of keys that we want to use5
we set the command that we want to execute6
we set a description for this mappingi
(for insert
mode), n
(for normal
mode), v
(for visual
and select
modes) or x
(for only visual
mode). The options are the same as
used in mappings.custom
.
alt/option
+ tab number.
To customize it, just pass a function to the tabs
key inside mappings
table.
The function receives the tab
number. That way you just concatenate the tab number with your custom keys:
<leader>h1
to go to tab 1, instead of alt
+ 1
.
lua
you can use the hooks.after_setup
entry in better-vim.lua
file, following this tutorial
from the Neovim official documentation.
nvim-cmp
) using lua
, just use the cmp
entry in your configuration.
Check out the example below with defaults:
before_default_sources
and after_default_sources
options can be used to load
nvim-cmp
plugins before and after the default sources that is already installed with Better Vim.
If you want to know more about nvim-cmp
sources, check out the plugin documentation.