All Projects β†’ caenrique β†’ nvim-toggle-terminal

caenrique / nvim-toggle-terminal

Licence: MIT license
NeoVim plugin that toggles a terminal buffer in the current window maintaining the same shell instance

Programming Languages

Vim Script
2826 projects

Projects that are alternatives of or similar to nvim-toggle-terminal

qf helper.nvim
A collection of improvements for the quickfix buffer
Stars: ✭ 70 (+29.63%)
Mutual labels:  vim-plugin, nvim, nvim-plugin
vim-lamp
πŸ’‘Language Server Protocol client for Vim.
Stars: ✭ 34 (-37.04%)
Mutual labels:  vim-plugin, nvim, nvim-plugin
code runner.nvim
Neovim plugin.The best code runner you could have, it is like the one in vscode but with super powers, it manages projects like in intellij but without being slow
Stars: ✭ 234 (+333.33%)
Mutual labels:  vim-plugin, nvim, nvim-plugin
Coc.nvim
Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Stars: ✭ 18,268 (+33729.63%)
Mutual labels:  vim-plugin, nvim
Vimrc
πŸ“ Vim Configuration for nerds with vim-plug
Stars: ✭ 33 (-38.89%)
Mutual labels:  vim-plugin, nvim
Ncm R
R autocompletion for Neovim and vim 8 πŸ“ πŸ“Š ⚑️
Stars: ✭ 102 (+88.89%)
Mutual labels:  vim-plugin, nvim
vim-opex
Vim operators to execute text objects
Stars: ✭ 19 (-64.81%)
Mutual labels:  vim-plugin, nvim
Neovim-from-scratch
πŸ“š A Neovim config designed from scratch to be understandable
Stars: ✭ 3,825 (+6983.33%)
Mutual labels:  nvim, nvim-plugin
nvim-highlite
A colorscheme template that is "lite" on logic for the developer.
Stars: ✭ 163 (+201.85%)
Mutual labels:  nvim, nvim-plugin
Dot-It-Up
A collection of dotfile scripts, plugins, and clever hacks so that you can become the master of your own OS! πŸš€
Stars: ✭ 254 (+370.37%)
Mutual labels:  vim-plugin, nvim
bolt.nvim
⚑ Ultrafast multi-pane file manager for Neovim with fuzzy matching
Stars: ✭ 100 (+85.19%)
Mutual labels:  vim-plugin, nvim
Rigel
🌌 Colorscheme for vim, terminal, vscode and slack - based on the star Rigel ✨.
Stars: ✭ 324 (+500%)
Mutual labels:  vim-plugin, nvim
Spaceduck
πŸš€ πŸ¦† An intergalactic space theme for Vim, Terminal, and more!
Stars: ✭ 177 (+227.78%)
Mutual labels:  vim-plugin, nvim
Vim Lsp Cxx Highlight
Vim plugin for C/C++/ObjC semantic highlighting using cquery, ccls, or clangd
Stars: ✭ 231 (+327.78%)
Mutual labels:  vim-plugin, nvim
Mkdx
A vim plugin that adds some nice extra's for working with markdown documents
Stars: ✭ 295 (+446.3%)
Mutual labels:  vim-plugin, nvim
aerial.nvim
Neovim plugin for a code outline window
Stars: ✭ 485 (+798.15%)
Mutual labels:  nvim, nvim-plugin
vim-twitter
Tweet from inside vim!
Stars: ✭ 26 (-51.85%)
Mutual labels:  vim-plugin, vimscript
unfog.vim
⏱ Vim plugin for Unfog CLI task & time manager.
Stars: ✭ 61 (+12.96%)
Mutual labels:  vim-plugin, vimscript
telescope-zoxide
An extension for telescope.nvim that allows you operate zoxide within Neovim.
Stars: ✭ 126 (+133.33%)
Mutual labels:  nvim, nvim-plugin
cutlass.nvim
Plugin that adds a 'cut' operation separate from 'delete'
Stars: ✭ 78 (+44.44%)
Mutual labels:  nvim, nvim-plugin

Toggle terminal buffer or create new one if there is none. It keeps the shell session between toggles.

You have to set your own key bindings. For example:

nnoremap <silent> <C-z> :ToggleTerminal<Enter>
tnoremap <silent> <C-z> <C-\><C-n>:ToggleTerminal<Enter>

Commands

Command Description
:ToggleTerminal Toggles a terminal which is the same shell instance regardless of where it is called
:ToggleTabTerminal Toggles a tab specific terminal instance. It will have a different shell session for each tab
:ToggleWindowTerminal Toggles a window specific terminal instance. It will have a different shell session for each window

Settings

Setting Description Default
g:preserve_alternate_buffer Preserve the alternate_buffer of the current window when opening and closing the terminal 1
g:auto_start_insert enter insert mode automatically when given focus. Uses BufEnter event 0
g:open_in_insert_mode start in insert mode when you open the terminal. Uses BufWinEnter event 1

Instalation

Use your favourite plugin manager. For example, using Plug:

call plug#begin()
Plug 'caenrique/nvim-toggle-terminal'
call plug#end()

Other useful settings

Some extra setting that can be used in conjuction with this plugin for convenience:

Make your life easier by mapping ESC in terminal mode. And if you use fzf, this will not break the ESC behaviour:

tnoremap <expr> <Esc> (&filetype == "fzf") ? "<Esc>" : "<c-\><c-n>"

Use this to switch back and forth between files and terminal without the anoying No write since last change (add ! to override) message with unsaved changes:

set autowriteall

Use nvr to avoid nesting nvim in Terminal buffers. This should go in your .bashrc or similar:

nvim_wrapper() {
  NVIM=`which nvim`
  if test -z $NVIM_LISTEN_ADDRESS; then
      $NVIM $@
  else
    if test -z $@; then
        nvr -l -c new
    else
        nvr -l $@
    fi
  fi
}
alias nvim="nvim_wrapper"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].