FYI noob here.
I want to run current file in floating terminal. I'm using NvChad and when I execute ALT+i I get the following:
I already played with some key binds, but I haven't achieved what I need. Currently, in my ~/.config/nvim/lua/custom/mappings.lua I have the following:
---@type MappingsTable
local M = {}
M.general = {
n = {
[";"] = { ":", "enter command mode", opts = { nowait = true } },
},
}
-- more keybinds!
M.custom = {
n = {
["<C-R>"] = {"<cmd>sp<CR><cmd>term python %<CR>", "Run current Python file in terminal"},
["<C-W>"] = {":bd!<CR>", "Close current buffer"}
}
}
return M
When I do C-R I can run succesfuly the python file but currently it goes horizontally and below my current file.
I tried tabnew
and split
but no luck.
By the way, from documentation I have:
C = CTRL
leader = SPACE
A = ALT
S = SHIFT
A-i: to open a terminal in a floating tab
A-h: to open a terminal in horizontal term
A-v: to open a terminal in vertical term
And I'm using Linux fedora
Any thoughts?