From 1f05dec8bd65a8163d9cb20308b53f89f4633ae4 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 2 May 2021 00:30:45 +0200 Subject: minor updates --- .config/nvim/lua/_which-key/init.lua | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to '.config/nvim/lua/_which-key') diff --git a/.config/nvim/lua/_which-key/init.lua b/.config/nvim/lua/_which-key/init.lua index 65742b6..e378fb3 100644 --- a/.config/nvim/lua/_which-key/init.lua +++ b/.config/nvim/lua/_which-key/init.lua @@ -48,7 +48,7 @@ vim.api.nvim_set_keymap('n', '', '', {noremap = true, silent = true} vim.g.mapleader = ' ' -- no hl -vim.api.nvim_set_keymap('n', 'h', ':set hlsearch!', {noremap = true, silent = true}) +vim.api.nvim_set_keymap('n', 'n', ':set hlsearch!', {noremap = true, silent = true}) -- explorer vim.api.nvim_set_keymap('n', 'e', ':NvimTreeToggle', {noremap = true, silent = true}) @@ -60,8 +60,8 @@ vim.api.nvim_set_keymap('n', 'f', ':Telescope find_files', {noremap vim.api.nvim_set_keymap('n', ';', ':Dashboard', {noremap = true, silent = true}) -- Comments --- vim.api.nvim_set_keymap("n", "/", ":CommentToggle", {noremap = true, silent = true}) --- vim.api.nvim_set_keymap("v", "/", ":CommentToggle", {noremap = true, silent = true}) +vim.api.nvim_set_keymap("n", "k", ":CommentToggle", {noremap = true, silent = true}) +vim.api.nvim_set_keymap("v", "k", ":CommentToggle", {noremap = true, silent = true}) -- Zen mode vim.api.nvim_set_keymap("n", "z", ':TZAtaraxis', {noremap = true, silent = true}) @@ -69,15 +69,21 @@ vim.api.nvim_set_keymap("n", "z", ':TZAtaraxis', {noremap = true, si -- close buffer vim.api.nvim_set_keymap("n", "c", ":BufferClose", {noremap = true, silent = true}) +-- split window +vim.api.nvim_set_keymap("n", "h", ":vsplit", {noremap = true, silent = true}) +vim.api.nvim_set_keymap("n", "v", ":split", {noremap = true, silent = true}) + -- TODO create entire treesitter section local mappings = { - -- ["/"] = "Comment", + ["k"] = "Comment", ["c"] = "Close Buffer", ["z"] = "Zen Mode", ["e"] = "Explorer", ["f"] = "Find File", - ["h"] = "No Highlight", + ["n"] = "No Highlight", + ["v"] = "Vertical Split", + ["h"] = "Horizontal Split", d = { name = "+Debug", b = {"DebugToggleBreakpoint", "Toggle Breakpoint"}, -- cgit v1.2.3-70-g09d2