From 22f4bdbe08a6d7514171ad4650d5a9a69db664a9 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 11 Jun 2024 22:20:09 +0200 Subject: nvim: Add a text-object for the whole buffer --- .config/nvim/init.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.config') 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', 'a', 'gg0oG$', + { desc = 'Select the [A]ll of the buffer' }) +vim.keymap.set('o', 'a', ':normal! ggVG', + { desc = 'Text object of [A]ll of the buffer' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) vim.keymap.set('n', '', '', -- cgit v1.2.3