From aa5f588992807302ea40e8e3344693c1d31948da 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/nvim') 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', '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