diff options
| author | pml68 <tutorialmester@gmail.com> | 2024-03-19 20:48:40 +0100 |
|---|---|---|
| committer | pml68 <tutorialmester@gmail.com> | 2024-03-19 20:48:40 +0100 |
| commit | 31b34f3520cba81853261a1094d2a0f927c599ab (patch) | |
| tree | 317e02d998a28f62229f57e7908106565a8d11cc | |
| parent | feat: add keymaps for moving in and out of terminal (diff) | |
| download | nvim-31b34f3520cba81853261a1094d2a0f927c599ab.tar.gz | |
feat: remap a to % and r to R in Netrw
Diffstat (limited to '')
| -rw-r--r-- | lua/pml68/remap.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lua/pml68/remap.lua b/lua/pml68/remap.lua index 1456161..c1fe1c7 100644 --- a/lua/pml68/remap.lua +++ b/lua/pml68/remap.lua @@ -50,3 +50,18 @@ vim.api.nvim_create_autocmd('LspAttach', { vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts) end }) + +-- Netrw (u/vonheikemen) +vim.api.nvim_create_autocmd('filetype', { + pattern = 'netrw', + desc = 'Better mappings for netrw', + callback = function() + local bind = function(lhs, rhs) + vim.keymap.set('n', lhs, rhs, {remap = true, buffer = true}) + end + + bind('a', '%') + + bind('r', 'R') + end +}) |
