diff options
Diffstat (limited to 'pkgs/custom-neovim/config/lua/keymaps.lua')
| -rw-r--r-- | pkgs/custom-neovim/config/lua/keymaps.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/custom-neovim/config/lua/keymaps.lua b/pkgs/custom-neovim/config/lua/keymaps.lua index 7601552..5cdeb09 100644 --- a/pkgs/custom-neovim/config/lua/keymaps.lua +++ b/pkgs/custom-neovim/config/lua/keymaps.lua @@ -23,6 +23,7 @@ mapkey("n", "<leader>l", "Open tab cd picker", ":Pick cd scope='tab'<cr>", "mini -- File manager mapkey("n", "<leader>e", "Open file manager", ":lua MiniFiles.open()<cr>", "mini.files") +mapkey("n", "<leader>E", "Open file manager at current file", ":lua MiniFiles.open(vim.api.nvim_buf_get_name(0))<cr>", "mini.files") -- Git mapkey("n", "<leader>g", "Manage git", "") @@ -80,7 +81,12 @@ mapkey("n", "<leader>wl", "Leave current session", function() end) -- Terminal -mapkey("n", "<leader>n", "Open terminal", ":botright terminal<cr>") +mapkey("n", "<leader>n", "Open terminal", function() + vim.cmd("botright split") + vim.cmd("resize " .. math.floor(vim.o.lines / 3)) + vim.cmd("terminal") + vim.cmd("startinsert") +end) -- Toggle spellcheck mapkey("n", "zq", "Toggle spellcheck", ":set spell!<cr>") @@ -108,8 +114,4 @@ mapkey({ "n", "v" }, "<up>", "Go up visually", "g<up>") -- QOL Keys mapkey("t", "<Esc><Esc>", "Exit terminal insert mode", "<C-\\><C-n>") --- vim.keymap.set("c", "<cr>", function() --- if vim.fn.pumvisible() == 1 then return '<c-y>' end --- return '<cr>' --- end, { expr = true }) -- Make enter complete command. mapkey("n", "<esc>", "Clear highlights", ":noh<cr>") -- Make esc clear highlights |
