summaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-11 22:20:09 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-11 22:20:09 +0200
commit22f4bdbe08a6d7514171ad4650d5a9a69db664a9 (patch)
treec6ec41a7b25767bf82d6bb9831c86ac818582c4d /.config/nvim
parente4ee5b68af2ac10b8bf3aa33aeafb1f98c5ab5d9 (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 a11639f..c0709dc 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>',