aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsiduck <siduck@tutanota.com>2022-05-14 07:10:31 +0530
committersiduck <siduck@tutanota.com>2022-05-14 07:10:31 +0530
commitbfef0fdbd06b7bcbee0f4cdf4a8078bc4e27a23c (patch)
treee8b25116039dd1649733451be9bf22667e9f4b02
parentavoid mapping by default (diff)
fix incorrect mapping examples in readme | #9
-rw-r--r--README.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/README.md b/README.md
index 5a13c6e..69f6672 100644
--- a/README.md
+++ b/README.md
@@ -114,10 +114,12 @@ local ft_cmds = {
...
<your commands here>
}
+local toggle_modes = {'n', 't'}
local mappings = {
- { 'n', '<C-l>', function () terminal.send(ft_cmds[vim.bo.filetype]) end },
- { 'n', '<Leader>s', function () terminal.toggle('horizontal') end },
- { 'n', '<Leader>v', function () terminal.toggle('vertical') end },
+ { 'n', '<C-l>', function () require("nvterm.terminal").send(ft_cmds[vim.bo.filetype]) end },
+ { toggle_modes, '<A-h>', function () require("nvterm.terminal").toggle('horizontal') end },
+ { toggle_modes, '<A-v>', function () require("nvterm.terminal").toggle('vertical') end },
+ { toggle_modes, '<A-i>', function () require("nvterm.terminal").toggle('float') end },
}
local opts = { noremap = true, silent = true }
for _, mapping in ipairs(mappings) do