/term.nvim

A neovim plugin to open terminal in floating window.

Primary LanguageLua

term.nvim

Getting Started

Neovim 0.9 or higher is required for term.nvim to work.

Installation

Using packer.nvim

use { 'kessejones/term.nvim' }

Using vim-plug

Plug 'kessejones/term.nvim'

Using dein

call dein#add('kessejones/term.nvim')

Configuration

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 })

Contributing

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.

License

Distributed under the same terms as Neovim itself.