From bfef0fdbd06b7bcbee0f4cdf4a8078bc4e27a23c Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 14 May 2022 07:10:31 +0530 Subject: fix incorrect mapping examples in readme | #9 --- README.md | 8 +++++--- 1 file 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 = { ... } +local toggle_modes = {'n', 't'} local mappings = { - { 'n', '', function () terminal.send(ft_cmds[vim.bo.filetype]) end }, - { 'n', 's', function () terminal.toggle('horizontal') end }, - { 'n', 'v', function () terminal.toggle('vertical') end }, + { 'n', '', function () require("nvterm.terminal").send(ft_cmds[vim.bo.filetype]) end }, + { toggle_modes, '', function () require("nvterm.terminal").toggle('horizontal') end }, + { toggle_modes, '', function () require("nvterm.terminal").toggle('vertical') end }, + { toggle_modes, '', function () require("nvterm.terminal").toggle('float') end }, } local opts = { noremap = true, silent = true } for _, mapping in ipairs(mappings) do -- cgit v1.2.3-70-g09d2