{"id":13898429,"url":"https://github.com/erietz/vim-terminator","last_synced_at":"2025-06-20T06:07:07.564Z","repository":{"id":42058129,"uuid":"336072948","full_name":"erietz/vim-terminator","owner":"erietz","description":":dagger: Run your code in an output buffer or a vim terminal conveniently","archived":false,"fork":false,"pushed_at":"2022-04-15T21:49:37.000Z","size":591,"stargazers_count":118,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T06:06:49.157Z","etag":null,"topics":["async","neovim","neovim-terminal","vim","vim-plugin","vim-terminal"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erietz.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":"2021-02-04T20:22:24.000Z","updated_at":"2025-02-09T16:25:19.000Z","dependencies_parsed_at":"2022-08-12T03:40:20.918Z","dependency_job_id":null,"html_url":"https://github.com/erietz/vim-terminator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erietz/vim-terminator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erietz%2Fvim-terminator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erietz%2Fvim-terminator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erietz%2Fvim-terminator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erietz%2Fvim-terminator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erietz","download_url":"https://codeload.github.com/erietz/vim-terminator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erietz%2Fvim-terminator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260891141,"owners_count":23077910,"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":["async","neovim","neovim-terminal","vim","vim-plugin","vim-terminal"],"created_at":"2024-08-06T18:04:17.500Z","updated_at":"2025-06-20T06:07:02.548Z","avatar_url":"https://github.com/erietz.png","language":"Vim script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"\u003e I require a cutting tool\n\n# About\n\nVim-terminator runs your current file. Out of the box it comes with support\nfor 47 languages and can be extended for any vim file type. Using automatic\nfile type detection, this plugin can\n\n1. Run your current file (or visual selection) in a custom \"output buffer\"\n  - stdout is sent to the output buffer and stderr is sent to the quickfix window\n  - The process is executed asynchronously leaving your editor completely functional\n  - The process is timed and reported in seconds to 6 decimal places at the end\n  of the running job\n2. Run your current file (or visual selection) in a vim terminal\n  - This allows for running interactive programs (e.g. user input)\n3. Start a REPL using the current file type\n4. Send parts of the current buffer to a terminal. This includes\n  - Visually selected text\n  - Text between commented delimiters\n\n# Demo\n\nRun the current file in the output buffer:\n\n![Run current file in output buffer](./media/run_in_output_buffer.gif \"Run file in the output buffer\")\n\nRun the current file containing errors for quick fixing:\n\n![Run current file with errors](./media/quickfix.gif \"Run file with errors for quickfix\")\n\nRun the current file in a terminal:\n\n![Run current file in a neovim terminal](./media/run_in_terminal.gif \"Run file in the terminal\")\n\nSend text between delimiters to a REPL:\n\n![Send text in delimiter to a new REPL](./media/send_to_repl.gif \"Sending text to REPL\")\n\nAutomatic window resizing\n\n![Automatic window resizing](./media/resizing.gif)\n\n# Installation\n\nIf you use [vim-plug](https://github.com/junegunn/vim-plug)\n\n```vim\nplug 'erietz/vim-terminator', { 'branch': 'main'}\n```\n\nIf you use [packer](https://github.com/wbthomason/packer.nvim)\n\n```lua\nuse 'erietz/vim-terminator'\n```\n\n*Note:* This plugin requires neovim or vim version \u003e= 8.0\n\n# Usage\n\n| Key map                                     | Description                                                                        |\n| ---                                         | ---                                                                                |\n| `\u003cleader\u003eot`                                | Opens (or reopens) a terminal window                                               |\n| `\u003cleader\u003eor`                                | Opens a repl                                                                       |\n| `\u003cleader\u003erf`                                | Runs your current file (or visual selection) in the output buffer                  |\n| `\u003cleader\u003ert`                                | Runs your current file (or visual selection) in the terminal                       |\n| `\u003cleader\u003ers`                                | Stops the running job in the output buffer                                         |\n| `\u003cleader\u003erm`                                | Modifies command via command line before running in output buffer                  |\n|                                             | **Pro tip: hit `\u003cc-f\u003e` on vims command line to further modify before running**     |\n| `\u003cleader\u003esd`                                | Send text in delimiter to terminal                                                 |\n| `\u003cleader\u003ess`                                | Sends visual selection to terminal                                                 |\n| `:TerminatorSendToTerminal echo \"hi there\"` | Sends `echo \"hi there\"` to the terminal                                            |\n\n\n\u003e \"I do not like these key bindings, I'd like to set my own\"\n- Several key mappings are set by default, but they can be removed by adding\n`let g:terminator_clear_default_mappings = \"foo bar\"` to `init.vim` or `.vimrc`\n  - If this route is taken, check the file `plugin/terminator.vim` for internal\n  functions and commands.\n\n# Extensibility\n\n- Both the commands used to run the current file and to start a REPL for the\ncurrent file can be modified via a global dictionary defined in the `init.vim`\nor `vimrc` like this\n\n```vim\nlet g:terminator_runfile_map = {\n            \\ \"javascript\": \"node\",\n            \\ \"python\": \"python -u\",\n            \\ \"c\": \"gcc $dir$fileName -o $dir$fileNameWithoutExt \u0026\u0026 $dir$fileNameWithoutExt\",\n            \\ \"fortran\": \"cd $dir \u0026\u0026 gfortran $fileName -o $fileNameWithoutExt \u0026\u0026 $dir$fileNameWithoutExt\"\n            \\ }\n```\n\nallowing use of the variables defined below\n\n| Variable name            | Description                                                                |\n| ---                      | ---                                                                        |\n| $fileName                | what you would get from running  `basename` on the file                    |\n| $fileNameWithoutExt      | same as $fileName with everything after and including the last `.` removed |\n| $dir                     | the full path of the parent directory of the filename                      |\n| $dirWithoutTrailingSlash | same as $dir with the trailing slash removed                               |\n\n\n- The REPL command dictionary is defined similarly\n\n```vim\nlet g:terminator_repl_command = {\n  \\'python' : 'ipython --no-autoindent',\n  \\'javascript': 'node',\n  \\}\n````\n\n\n## REPL delimiters\n\n- This plugin automatically detects the comment style based on file type.\n- By default the delimiters used of the form `In\\[.*\\]:`\n- The delimiters can be modified using the variable `g:terminator_repl_delimiter_regex`\n  - For example: you could use `let g:terminator_repl_delimiter_regex = '--'`\n  to delimit code blocks. In this example \n    - A python code delimiter would be `# --`\n    - A javascript code delimiter would be `// --`\n    - etc.\n\n## Managing window splits\n\nTwo variables can be set to help manage how windows are split. A combination \nof these variables can go a long way.\n\n1. `let g:terminator_split_fraction = \u003cdecimal\u003e` where `\u003cdecimal\u003e` is a number between 0 and 1.\n2. `let g:terminator_split_location = '\u003coption\u003e'` where `\u003coption\u003e` is something like\n  - `belowright`\n  - `aboveleft`\n  - `topleft`\n  - `botright`\n  - `vertical belowright`\n  - `vertical aboveleft`\n  - `vertical topleft`\n  - `vertical botright`\n  - see `:help vertical` for details of these options\n\nThere is also the option `let g:terminator_auto_shrink_output = 1` which\nautomatically shrinks the output buffer (in a horizontal split) to the size of\nthe output if it is less than the maximum split size given by\n`g:terminator_split_fraction`.\n\n# FAQ\n\n\u003e The quickfix window is populated but I can't jump to the errors\n\nSet the `:compiler` for the file type. This in turn sets `errorformat`. See `:h errorformat`\n\n\u003e The quickfix window is not catching errors after running code of a different file type\n\nSwitch to the output buffer and run `:bdelete`. Then run your code again.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferietz%2Fvim-terminator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferietz%2Fvim-terminator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferietz%2Fvim-terminator/lists"}