From c3b336329814a56d5515635be3465b91e92f9e8e Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 20 Jan 2024 01:03:01 +0100 Subject: [PATCH] a ton of the old keys --- lua/custom/init.lua | 6 +++++- lua/custom/mappings.lua | 42 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index c2175ee..407a21b 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -6,6 +6,10 @@ opt.foldnestmax = 10 opt.foldlevel = 4 opt.signcolumn = "yes" opt.spelllang = "en,de" -opt.clipboard = "" -- dont just use the system clipboard +opt.clipboard = "" -- don't just use the system clipboard opt.wrap = false opt.breakindent = false +opt.spell = true +opt.list = true +opt.timeout = true +opt.timeoutlen = 300 -- ms diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index c587854..718c775 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -19,6 +19,7 @@ M.disabled = { ["]c"] = "", ["h"] = "", ["ff"] = "", + ["fm"] = "", ["fa"] = "", ["fw"] = "", ["fb"] = "", @@ -35,12 +36,15 @@ M.disabled = { ["ph"] = "", ["gb"] = "", ["td"] = "", + ["#"] = "", + ["?"] = "", }, t = { [""] = "", }, v = { - + ["#"] = "", + ["?"] = "", ["/"] = "", }, } @@ -65,7 +69,7 @@ M.tabufline = { }, -- close buffer + hide terminal buffer - [""] = { + [""] = { function() require("nvchad.tabufline").close_buffer() end, @@ -212,10 +216,22 @@ M.nvterm = { t = { -- preserve defaults + [""] = { + function() + require("nvterm.terminal").toggle "float" + end, + "Toggle floating term", + }, }, n = { -- preserve defaults + [""] = { + function() + require("nvterm.terminal").toggle "float" + end, + "Toggle floating term", + }, }, } @@ -256,6 +272,9 @@ M.movements = { -- go to beginning and end ["H"] = { "", "Beginning of line" }, ["L"] = { "", "End of line" }, + + -- go to mark with "#" + ["#"] = { "'", "go to mark" }, }, v = { --big move @@ -305,7 +324,7 @@ M.edit = { -- remove trailing whitespace ["fw"] = { function() - require('mini.trailspace').trim() + require("mini.trailspace").trim() end, "remove whitespace", }, @@ -342,9 +361,22 @@ M.ui = { end, "toggle wrap", }, + + -- toggle some features + ["tn"] = { "setlocal nonumber!", "toggle line numbers" }, + ["trn"] = { "setlocal nornu!", "toggle relative line numbers" }, + ["ts"] = { "setlocal spell!", "toggle spell check" }, + + -- open windows + ['"'] = { "vsplit", "open a new window to the side" }, + ["%"] = { "split", "open a new window on the totop" }, + + -- tabs + ["wtn"] = { "tabnew", "open a new tab" }, + ["wtc"] = { "tabclose", "close current tab" }, + ["wtj"] = { "tabnext", "open a new tab" }, + ["wtk"] = { "tabprevious", "open a new tab" }, }, } --- more keybinds! - return M