From b443e6ff9172ea51ff3c2abaf1e1acf06acce625 Mon Sep 17 00:00:00 2001 From: rootiest Date: Tue, 8 Oct 2024 04:25:31 -0400 Subject: [PATCH] feat: add ellipsis replacement functionality on InsertLeave --- lua/config/keymaps.lua | 6 ++++++ lua/data/keys.lua | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 097162d..5dcd5e6 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -60,3 +60,9 @@ end -- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Overrides ━━━━━━━━━━━━━━━━━━━━━━━━━━ -- Add keymaps for overrides add_keymap(data.keys.overrides) + +-- Replace '...' with '…' (ellipsis) on InsertLeave +data.func.setup_replace_ellipsis(true) + +-- Search selected text in visual mode +add_keymap("/", "*", "Search selected text", "v") diff --git a/lua/data/keys.lua b/lua/data/keys.lua index 290560c..9868e66 100644 --- a/lua/data/keys.lua +++ b/lua/data/keys.lua @@ -799,7 +799,16 @@ M.indentor = { M.lazygit = { { -- LazyGit "lg", - "LazyGit", + function() + require("data.func").open_lazygit_popup() + end, + desc = "LazyGit", + }, + { -- LazyGit + "gg", + function() + require("data.func").open_lazygit_popup() + end, desc = "LazyGit", }, } @@ -853,6 +862,13 @@ M.misc = { end, desc = "Yank Line-text", }, + { -- Yank and trim selection + lhs = "y", + rhs = function() + require("data.func").trim_yank() + end, + desc = "Yank and trim selection", + }, { -- Hardmode lhs = "uH", rhs = function()