aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Klitzke <philologos14@gmail.com>2023-09-09 13:25:58 +0900
committerPatrick Klitzke <philologos14@gmail.com>2023-09-09 13:25:58 +0900
commit5b8faa5b7ec4798bfbcfa71011a436665fa8c52a (patch)
tree3833829e98b8895d3949803ee4b9ac8d12ba7c34
parentUpdate README.md (diff)
Use terminal variable in sample code
-rw-r--r--README.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index cd1f022..12e42e8 100644
--- a/README.md
+++ b/README.md
@@ -96,10 +96,10 @@ local ft_cmds = {
}
local toggle_modes = {'n', 't'}
local mappings = {
- { '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 },
+ { 'n', '<C-l>', function () terminal.send(ft_cmds[vim.bo.filetype]) end },
+ { toggle_modes, '<A-h>', function () terminal.toggle('horizontal') end },
+ { toggle_modes, '<A-v>', function () terminal.toggle('vertical') end },
+ { toggle_modes, '<A-i>', function () terminal.toggle('float') end },
}
local opts = { noremap = true, silent = true }
for _, mapping in ipairs(mappings) do