{"id":13479795,"url":"https://github.com/caenrique/nvim-toggle-terminal","last_synced_at":"2025-03-27T10:30:44.868Z","repository":{"id":47584722,"uuid":"255599539","full_name":"caenrique/nvim-toggle-terminal","owner":"caenrique","description":"NeoVim plugin that toggles a terminal buffer in the current window maintaining the same shell instance","archived":false,"fork":false,"pushed_at":"2022-10-25T15:26:40.000Z","size":31368,"stargazers_count":60,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-30T13:38:27.668Z","etag":null,"topics":["neovim","nvim","nvim-plugin","vim","vim-plugin","vimscript"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caenrique.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-14T12:12:30.000Z","updated_at":"2024-04-10T07:48:23.000Z","dependencies_parsed_at":"2023-01-20T08:27:07.199Z","dependency_job_id":null,"html_url":"https://github.com/caenrique/nvim-toggle-terminal","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caenrique%2Fnvim-toggle-terminal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caenrique%2Fnvim-toggle-terminal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caenrique%2Fnvim-toggle-terminal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caenrique%2Fnvim-toggle-terminal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caenrique","download_url":"https://codeload.github.com/caenrique/nvim-toggle-terminal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245826699,"owners_count":20678843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neovim","nvim","nvim-plugin","vim","vim-plugin","vimscript"],"created_at":"2024-07-31T16:02:23.113Z","updated_at":"2025-03-27T10:30:44.614Z","avatar_url":"https://github.com/caenrique.png","language":"Vim Script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"⚠️ NOT MAINTAINED ANYMORE! ⚠️\n\n🆕 ➡️ See new version written in lua: https://github.com/caenrique/buffer-term.nvim\n\nToggle terminal buffer or create new one if there is none.\nIt keeps the shell session between toggles.\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://i.imgur.com/vL96PcL.gif\"\u003e\n\u003cp\u003e\n\nYou have to set your own key bindings. For example:\n\n```vim\nnnoremap \u003csilent\u003e \u003cC-z\u003e :ToggleTerminal\u003cEnter\u003e\ntnoremap \u003csilent\u003e \u003cC-z\u003e \u003cC-\\\u003e\u003cC-n\u003e:ToggleTerminal\u003cEnter\u003e\n```\n\n## Commands\n\n| Command               | Description                                                                                         |\n|-----------------------|-----------------------------------------------------------------------------------------------------|\n| :ToggleTerminal       | Toggles a terminal which is the same shell instance regardless of where it is called                |\n| :ToggleTabTerminal    | Toggles a tab specific terminal instance. It will have a different shell session for each tab            |\n| :ToggleWindowTerminal | Toggles a window specific terminal instance. It will have a different shell session for each window |\n\n## Settings\n\n| Setting                     | Description                                                                               | Default |\n|-----------------------------|-------------------------------------------------------------------------------------------|---------|\n| g:preserve_alternate_buffer | Preserve the alternate_buffer of the current window when opening and closing the terminal | 1       |\n| g:auto_start_insert         | enter insert mode automatically when given focus. Uses BufEnter event                     | 0       |\n| g:open_in_insert_mode       | start in insert mode when you open the terminal. Uses BufWinEnter event                   | 1       |\n\n## Instalation\n\nUse your favourite plugin manager. For example, using [Plug](https://github.com/junegunn/vim-plug):\n\n```vim\ncall plug#begin()\nPlug 'caenrique/nvim-toggle-terminal'\ncall plug#end()\n```\n\n## Other useful settings\n\nSome extra setting that can be used in conjuction with this plugin for convenience:\n\nMake your life easier by mapping ESC in terminal mode. And if you use fzf, this will not break the ESC behaviour:\n\n```vim\ntnoremap \u003cexpr\u003e \u003cEsc\u003e (\u0026filetype == \"fzf\") ? \"\u003cEsc\u003e\" : \"\u003cc-\\\u003e\u003cc-n\u003e\"\n```\n\nUse 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:\n\n```vim\nset autowriteall\n```\n\nUse [nvr](https://github.com/mhinz/neovim-remote) to avoid nesting nvim in Terminal buffers. This should go in your `.bashrc` or similar:\n\n```bash\nnvim_wrapper() {\n  NVIM=`which nvim`\n  if test -z $NVIM_LISTEN_ADDRESS; then\n      $NVIM $@\n  else\n    if test -z $@; then\n        nvr -l -c new\n    else\n        nvr -l $@\n    fi\n  fi\n}\nalias nvim=\"nvim_wrapper\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaenrique%2Fnvim-toggle-terminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaenrique%2Fnvim-toggle-terminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaenrique%2Fnvim-toggle-terminal/lists"}