termim.nvim improves your default neovim terminal experience, keeping it super simple.
- Auto enter insert mode when opening terminal
- Cleans up unnecessary clutter from terminal UI
- Auto closes or persist terminals based on your needs
- Handy commands and keybindings to work with full screen, floating and split terminals
- Extend commands with any program of your choice
- neovim
Add the following to your lazy/packer config
-- Lazy
{
'2kabhishek/termim.nvim',
cmd = { 'Fterm', 'FTerm', 'Sterm', 'STerm', 'Tterm', 'TTerm', 'Vterm', 'VTerm' },
},
-- Packer
use '2kabhishek/termim.nvim'termim.nvim adds the following commands:
-
Fterm: open floating terminal -
Sterm: open terminal in new horizontal split -
Tterm: open terminal in new tab -
Vterm: open terminal in new vertical split -
FTerm/STerm/TTerm/VTerm: same as above but persist the terminal if not exited manually
All the commands accept optional command as arg, if command is missing, your default shell will run
Tterm lazygit: will open lazygit in a new tab
termim.nvim adds the following mappings:
- J J β Return to normal mode in terminals, remap for
<C-\><C-n> - q - Close terminal buffer from insert mode, respects persistence / auto-close behaviour
- Ctrl + q - Close terminal buffer from any mode, respects persistence / auto-close behaviour
Other than the standard commands, you can use which-key to create your own commands.
t = {
name = 'Terminal',
['`'] = { '<cmd>Sterm<cr>', 'Horizontal Terminal' },
e = { '<cmd>Sterm iex<cr>', 'Elixir' },
f = { '<cmd>Fterm<cr>', 'Floating Terminal' },
g = { '<cmd>Fterm lazygit<cr>', 'Lazygit' },
n = { '<cmd>Sterm node<cr>', 'Node' },
p = { '<cmd>Sterm bpython<cr>', 'Python' },
r = { '<cmd>Sterm irb<cr>', 'Ruby' },
s = { '<cmd>Sterm<cr>', 'Horizontal Terminal' },
t = { '<cmd>Tterm<cr>', 'Terminal' },
v = { '<cmd>Vterm<cr>', 'Vertical Terminal' },
},You tell me!
Most terminal plugins offer a lot more than I needed, whereas I needed some small enhancements of the default neovim terminal experience.
- Figuring out some autogroup and buffer related APIs
- tdo.nvim β Fast and simple note-taking in neovim
- co-author.nvim β Search and add git co authors
- nerdy.nvim β Search and add nerd glyphs
β hit the star button if you found this useful β
Source | Blog | Twitter | LinkedIn | More Links | Other Projects
