mirror of
https://github.com/NvChad/NvChad.git
synced 2024-11-18 15:25:47 +00:00
Now have 3 separate terms, window, vert & hori, renamed some variables (#251)
This commit is contained in:
parent
c80d79a7cc
commit
e80a6935d6
@ -101,8 +101,9 @@ local M = {
|
||||
},
|
||||
toggleterm = {
|
||||
toggle_window = "<leader>w",
|
||||
toggle_right = "<leader>v",
|
||||
toggle_bot = "<leader>h"
|
||||
toggle_vert = "<leader>v",
|
||||
toggle_hori = "<leader>h",
|
||||
hide_term = "JK"
|
||||
},
|
||||
insert_nav = {
|
||||
forward = "<C-l>",
|
||||
|
@ -49,14 +49,14 @@ M.toggleterm = function()
|
||||
local m = user_map.toggleterm
|
||||
|
||||
-- Open terminals
|
||||
map("n", m.toggle_window, ":execute v:count . 'ToggleTerm direction=window' <CR>", opt)
|
||||
map("n", m.toggle_right, ":execute v:count . 'ToggleTerm direction=vertical' <CR>", opt)
|
||||
map("n", m.toggle_bot, ":execute v:count . 'ToggleTerm direction=horizontal' <CR>", opt)
|
||||
map("n", m.toggle_window, ":lua termW:toggle() <CR>", opt)
|
||||
map("n", m.toggle_vert, ":lua termV:toggle() <CR>", opt)
|
||||
map("n", m.toggle_hori, ":lua termH:toggle() <CR>", opt)
|
||||
|
||||
-- 'Un' toggle a term from within terminal edit mode
|
||||
map("t", m.toggle_window, "<C-\\><C-n> :ToggleTerm <CR>", opt)
|
||||
map("t", m.toggle_right, "<C-\\><C-n> :ToggleTerm <CR>", opt)
|
||||
map("t", m.toggle_bot, "<C-\\><C-n> :ToggleTerm <CR>", opt)
|
||||
-- toggle(HIDE) a term from within terminal edit mode
|
||||
map("t", m.hide_term, "<C-\\><C-n> :ToggleTerm <CR>", opt)
|
||||
map("t", m.hide_term, "<C-\\><C-n> :ToggleTerm <CR>", opt)
|
||||
map("t", m.hide_term, "<C-\\><C-n> :ToggleTerm <CR>", opt)
|
||||
end
|
||||
|
||||
M.truezen = function()
|
||||
|
@ -31,3 +31,17 @@ toggleterm.setup {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local Terminal = require("toggleterm.terminal").Terminal
|
||||
|
||||
_G.termW = Terminal:new {
|
||||
direction = "window",
|
||||
}
|
||||
|
||||
_G.termV = Terminal:new {
|
||||
direction = "vertical",
|
||||
}
|
||||
|
||||
_G.termH = Terminal:new {
|
||||
direction = "horizontal",
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user