Skip to content

Commit

Permalink
shortcut: toggleterm
Browse files Browse the repository at this point in the history
  • Loading branch information
SirAppSec committed Sep 6, 2024
1 parent f06e75e commit 2f27031
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions lua/hacker-helper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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', '<leader>e', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()<CR>',
{ noremap = true, silent = true })
vim.api.nvim_set_keymap('v', '<leader>e', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()<CR>',
{ noremap = true, silent = true })
end

M.hello = function()
return module.my_first_function(M.config.opt)
end

vim.api.nvim_set_keymap('n', '<leader>e', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()<CR>',
{ noremap = true, silent = true })
vim.api.nvim_set_keymap('v', '<leader>e', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()<CR>',
{ noremap = true, silent = true })

return M
10 changes: 5 additions & 5 deletions plugin/hacker-helper.lua
Original file line number Diff line number Diff line change
@@ -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', '<leader>re', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()<CR>',
{ noremap = true, silent = true })
vim.api.nvim_set_keymap('v', '<leader>re', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()<CR>',
{ noremap = true, silent = true })
-- -- Key mappings for executing in terminal
-- vim.api.nvim_set_keymap('n', '<leader>re', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()<CR>',
-- { noremap = true, silent = true })
-- vim.api.nvim_set_keymap('v', '<leader>re', ':lua require("hacker-helper.module").exec_line_or_selection_in_term()<CR>',
-- { noremap = true, silent = true })

0 comments on commit 2f27031

Please sign in to comment.