Skip to content

Commit

Permalink
fix(keymap): be able to open multiple terminals according to togglete…
Browse files Browse the repository at this point in the history
…rm default behavior.

Signed-off-by: ayamir <[email protected]>
  • Loading branch information
ayamir committed Sep 30, 2023
1 parent 83eb3b5 commit e5db79e
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions lua/keymap/tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,13 @@ local plug_map = {
-- Plugin: toggleterm
["t|<Esc><Esc>"] = map_cmd([[<C-\><C-n>]]):with_noremap():with_silent(), -- switch to normal mode in terminal.
["t|jk"] = map_cmd([[<C-\><C-n>]]):with_noremap():with_silent(), -- switch to normal mode in terminal.
["n|<C-\\>"] = map_cr([[execute v:count . "ToggleTerm direction=horizontal"]])
:with_noremap()
:with_silent()
:with_desc("terminal: Toggle horizontal"),
["i|<C-\\>"] = map_cmd("<Esc><Cmd>ToggleTerm direction=horizontal<CR>")
["n|<C-\\>"] = map_cr("ToggleTerm"):with_noremap():with_silent():with_desc("terminal: Toggle horizontal"),
["i|<C-\\>"] = map_cmd("<Esc><Cmd>ToggleTerm<CR>")
:with_noremap()
:with_silent()
:with_desc("terminal: Toggle horizontal"),
["t|<C-\\>"] = map_cmd("<Cmd>ToggleTerm<CR>"):with_noremap():with_silent():with_desc("terminal: Toggle horizontal"),
["n|<A-\\>"] = map_cr([[execute v:count . "ToggleTerm direction=vertical"]])
["n|<A-\\>"] = map_cr("ToggleTerm direction=vertical")
:with_noremap()
:with_silent()
:with_desc("terminal: Toggle vertical"),
Expand All @@ -41,7 +38,7 @@ local plug_map = {
:with_silent()
:with_desc("terminal: Toggle vertical"),
["t|<A-\\>"] = map_cmd("<Cmd>ToggleTerm<CR>"):with_noremap():with_silent():with_desc("terminal: Toggle vertical"),
["n|<F5>"] = map_cr([[execute v:count . "ToggleTerm direction=vertical"]])
["n|<F5>"] = map_cr("ToggleTerm direction=vertical")
:with_noremap()
:with_silent()
:with_desc("terminal: Toggle vertical"),
Expand All @@ -50,10 +47,7 @@ local plug_map = {
:with_silent()
:with_desc("terminal: Toggle vertical"),
["t|<F5>"] = map_cmd("<Cmd>ToggleTerm<CR>"):with_noremap():with_silent():with_desc("terminal: Toggle vertical"),
["n|<A-d>"] = map_cr([[execute v:count . "ToggleTerm direction=float"]])
:with_noremap()
:with_silent()
:with_desc("terminal: Toggle float"),
["n|<A-d>"] = map_cr("ToggleTerm direction=float"):with_noremap():with_silent():with_desc("terminal: Toggle float"),
["i|<A-d>"] = map_cmd("<Esc><Cmd>ToggleTerm direction=float<CR>")
:with_noremap()
:with_silent()
Expand Down

0 comments on commit e5db79e

Please sign in to comment.