summaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-11 22:20:09 +0200
committerThomas Voss <thomas.voss@humanwave.nl> 2024-06-12 18:49:56 +0200
commitaa5f588992807302ea40e8e3344693c1d31948da (patch)
treeb6e11e59566000476c0c84dfca197cdd3adbec31 /.config/nvim
parent85ec4336c8dcbdd4a5b72fde7fae702a19bb3f6c (diff)
nvim: Add a text-object for the whole buffer
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/init.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index d2c45e5..1e7f0f3 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -50,6 +50,10 @@ function mk_scratch_buffer()
]]
end
+vim.keymap.set('x', '<leader>a', 'gg0oG$',
+ { desc = 'Select the [A]ll of the buffer' })
+vim.keymap.set('o', '<leader>a', ':normal! ggVG<CR>',
+ { desc = 'Text object of [A]ll of the buffer' })
vim.keymap.set('n', '<C-h>', '<C-w><C-h>',
{ desc = 'Move focus to the left window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>',