Neovim 0.9 or higher is required for term.nvim
to work.
Using packer.nvim
use { 'kessejones/term.nvim' }
Using vim-plug
Plug 'kessejones/term.nvim'
Using dein
call dein#add('kessejones/term.nvim')
You need to initialize term.nvim
with the setup function.
For example:
require("term").setup({
shell = vim.o.shell,
width = 0.5,
height = 0.5,
anchor = "NW",
position = "center",
title = {
align = "center", -- left, center or right
},
border = {
chars = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
hl = "TermBorder",
},
})
You can create the mappings you want to manager yours terminals
vim.keymap.set({ 't' }, '<C-p>', require('term').new, { silent = true })
vim.keymap.set({ 'n', 't' }, '<C-\\>', require('term').toggle, { silent = true })
vim.keymap.set({ 't' }, '<C-n>', require('term').next, { silent = true })
vim.keymap.set({ 't' }, '<C-p>', require('term').prev, { silent = true })
All contributions are welcome! Just open a pull request.
Please look at the Issues page to see the current backlog, suggestions, and bugs to work.
Distributed under the same terms as Neovim itself.