From 246291ed8ce240a513d9fdd86d46e6a7cc5c91b8 Mon Sep 17 00:00:00 2001 From: David Ibia Date: Tue, 30 Jan 2024 16:05:54 +0100 Subject: [PATCH] feat(remap.lua): add keymap for selecting all text with "a" shortcut The change adds a new keymap in the remap.lua file to select all text in the editor when the "a" shortcut is pressed. This allows users to quickly select the entire document without manually scrolling or using other selection methods. --- lua/absolute/remap.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/absolute/remap.lua b/lua/absolute/remap.lua index f28a852..02f3de5 100644 --- a/lua/absolute/remap.lua +++ b/lua/absolute/remap.lua @@ -3,6 +3,9 @@ local opts = { noremap = true, silent = true } opts.desc = "Show Cheatsheet" vim.keymap.set("n", "\\", "Cheatsheet", opts) -- toggle file explorer +opts.desc = "Select All" +vim.keymap.set("n", "a", "gg0vG$", opts) -- select all + -- Move selected line / block of text in visual mode up opts.desc = "Move selected line / block of text in visual mode up" vim.keymap.set("v", "J", ":m '>+1gv=gv", opts)