local cl = vim.o.columns local ln = vim.o.lines local width = 0.8 local height = 0.8 require("toggleterm").setup({ direction = "horizontal", float_opts = { border = "curved", width = math.ceil(cl * width), height = math.ceil(ln * height - 4), winblend = 3, }, open_mapping = [[]], hide_numbers = true, -- shell = 'fish', }) vim.keymap.set('n', [[]], [[ToggleTerm direction=float]]) vim.keymap.set('n', [[]], [[ToggleTerm direction=horizontal]]) -- tmux muscle-memory for fullscreening nvim window vim.keymap.set('n', [[z]], [[ToggleTermToggleAll]]) vim.keymap.set('t', [[z]], [[tab split]]) vim.keymap.set('t', '', [[]]) vim.keymap.set('t', '', [[wincmd h]]) vim.keymap.set('t', '', [[wincmd k]]) vim.keymap.set('t', '', [[wincmd h]]) vim.keymap.set('t', '', [[wincmd l]]) -- vim.keymap.set('n', '', [[ToggleTerm]], { noremap = true, silent = true }) -- vim.keymap.set('t', '', [[ToggleTerm]], { noremap = true, silent = true }) -- Custom gitui terminal local Terminal = require('toggleterm.terminal').Terminal local gitui = Terminal:new({ cmd = 'gitui', direction = 'float', hidden = true, }) function _gitui_toggle() gitui:toggle() end vim.api.nvim_set_keymap("n", "G", "lua _gitui_toggle()", { noremap = true, silent = true }) vim.api.nvim_set_keymap("t", "G", "lua _gitui_toggle()", { noremap = true, silent = true })