From 2f270316550e00c3a50e644cd7a1a83b54b46a61 Mon Sep 17 00:00:00 2001 From: Sir AppSec Date: Fri, 6 Sep 2024 04:20:23 +0300 Subject: [PATCH] shortcut: toggleterm --- lua/hacker-helper.lua | 8 ++++---- plugin/hacker-helper.lua | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lua/hacker-helper.lua b/lua/hacker-helper.lua index d6e515a..f3e7aaa 100644 --- a/lua/hacker-helper.lua +++ b/lua/hacker-helper.lua @@ -18,15 +18,15 @@ M.config = config -- you can also put some validation here for those. M.setup = function(args) M.config = vim.tbl_deep_extend("force", M.config, args or {}) + vim.api.nvim_set_keymap('n', 'e', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()', + { noremap = true, silent = true }) + vim.api.nvim_set_keymap('v', 'e', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()', + { noremap = true, silent = true }) end M.hello = function() return module.my_first_function(M.config.opt) end -vim.api.nvim_set_keymap('n', 'e', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()', - { noremap = true, silent = true }) -vim.api.nvim_set_keymap('v', 'e', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()', - { noremap = true, silent = true }) return M diff --git a/plugin/hacker-helper.lua b/plugin/hacker-helper.lua index 27269cc..b817578 100644 --- a/plugin/hacker-helper.lua +++ b/plugin/hacker-helper.lua @@ -1,8 +1,8 @@ vim.api.nvim_create_user_command("HackerHelper", require("hacker-helper").hello, {}) -- Key mappings for executing in terminal --- Key mappings for executing in terminal -vim.api.nvim_set_keymap('n', 're', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()', - { noremap = true, silent = true }) -vim.api.nvim_set_keymap('v', 're', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()', - { noremap = true, silent = true }) +-- -- Key mappings for executing in terminal +-- vim.api.nvim_set_keymap('n', 're', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()', +-- { noremap = true, silent = true }) +-- vim.api.nvim_set_keymap('v', 're', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()', +-- { noremap = true, silent = true })