{"id":13479755,"url":"https://github.com/voldikss/vim-floaterm","last_synced_at":"2025-05-15T02:08:03.483Z","repository":{"id":37415331,"uuid":"200437496","full_name":"voldikss/vim-floaterm","owner":"voldikss","description":":computer: Terminal manager for (neo)vim","archived":false,"fork":false,"pushed_at":"2025-05-14T04:53:45.000Z","size":657,"stargazers_count":2568,"open_issues_count":62,"forks_count":86,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-14T06:10:22.743Z","etag":null,"topics":["floating-window","neovim","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voldikss.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-04T01:39:56.000Z","updated_at":"2025-05-14T04:53:49.000Z","dependencies_parsed_at":"2023-02-09T19:00:51.653Z","dependency_job_id":"1360bed2-aaba-44c9-923b-641abcaf03e8","html_url":"https://github.com/voldikss/vim-floaterm","commit_stats":{"total_commits":595,"total_committers":51,"mean_commits":"11.666666666666666","dds":"0.19159663865546217","last_synced_commit":"4e28c8dd0271e10a5f55142fb6fe9b1599ee6160"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voldikss%2Fvim-floaterm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voldikss%2Fvim-floaterm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voldikss%2Fvim-floaterm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voldikss%2Fvim-floaterm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voldikss","download_url":"https://codeload.github.com/voldikss/vim-floaterm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254259383,"owners_count":22040820,"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":["floating-window","neovim","vim-terminal"],"created_at":"2024-07-31T16:02:22.488Z","updated_at":"2025-05-15T02:07:58.473Z","avatar_url":"https://github.com/voldikss.png","language":"Vim Script","funding_links":[],"categories":["Vim Script","Vim script"],"sub_categories":[],"readme":"Use (neo)vim terminal in the floating/popup window.\n\n[![CI](https://github.com/voldikss/vim-floaterm/workflows/CI/badge.svg)](https://github.com/voldikss/vim-floaterm/actions?query=workflow%3ACI) [![GitHub license](https://img.shields.io/github/license/voldikss/vim-floaterm.svg)](https://github.com/voldikss/vim-floaterm/blob/master/LICENSE) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/voldikss/vim-floaterm/graphs/commit-activity)\n\n![](https://user-images.githubusercontent.com/20282795/91376670-2db3b080-e850-11ea-9991-efa4f4da6f44.png)\n\n- [Features](#features)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Get started](#get-started)\n  - [Commands](#commands)\n  - [Options](#options)\n  - [Keymaps](#keymaps)\n  - [Highlights](#highlights)\n  - [Autocmd](#autocmd)\n- [Advanced Topics](#advanced-topics)\n  - [Use with command line tools](#use-with-command-line-tools)\n  - [Use with other plugins](#use-with-other-plugins)\n  - [How to define more wrappers](#how-to-define-more-wrappers)\n  - [How to write sources for fuzzy finder plugins](#how-to-write-sources-for-fuzzy-finder-plugins)\n- [Contributing](#contributing)\n- [FAQ](#faq)\n- [Breaking changes](#breaking-changes)\n- [Related projects](#related-projects)\n- [Credits](#credits)\n- [License](#license)\n\n## Features\n\n- Support neovim floatwin and vim8 popupwin\n- Manage multiple terminal instances\n- Customizable terminal window style\n- Switch/preview floating terminal buffers using fuzzy-finder plugins such as\n  [denite.nvim](https://github.com/Shougo/denite.nvim) or\n  [fzf](https://github.com/junegunn/fzf), etc.\n- Use with other external command-line tools(ranger, fzf, ripgrep etc.)\n- Use as a custom task runner for [asynctasks.vim](https://github.com/skywind3000/asynctasks.vim)\n  or [asyncrun.vim](https://github.com/skywind3000/asyncrun.vim)\n\n## Requirements\n\n- Vim or neovim with `terminal` feature\n\n## Installation\n\n- packer.nvim\n\n```lua\nuse 'voldikss/vim-floaterm'\n\n```\n\n- vim-plug\n\n```vim\nPlug 'voldikss/vim-floaterm'\n```\n\n- dein.nvim\n\n```vim\ncall dein#add('voldikss/vim-floaterm')\n```\n\n## Get Started\n\nUse `:FloatermNew` to open a terminal window, use `:FloatermToggle` to\nhide/reopen that. The filetype of the terminal buffer is `floaterm`.\n\nIf you've opened multiple floaterm instances, they will be attached to a\ndouble-circular-linkedlist. Then you can use `:FloatermNext` or\n`: FloatermPrev` to switch between them.\n\n**❗️Note**: Long-running jobs (e.g. `yarn watch`) inside the builtin terminal\nwould probably slowdown your operation. It's recommended to put them into the\nexternal terminals.\n\n### Commands\n\n#### `:FloatermNew[!] [options] [cmd]` Open a floaterm window.\n\n- If `!` is given, execute `cmd` in `$SHELL`. Try `:FloatermNew python` and\n  `: FloatermNew! python` to learn about the difference.\n- If execute without `cmd`, open `$SHELL`.\n- The `options` is formed as `--key[=value]`, it is used to specify local\n  attributes of a specific floaterm instance. Note that in order to input\n  space, you have to form it as `\\` followed by space, and `\\` must be typed\n  as `\\\\`\n  - `cwd` working directory that floaterm will be opened at. Accepts a\n    path, the literal `\u003croot\u003e` which represents the project root directory,\n    the literal `\u003cbuffer\u003e` which specifies the directory of the active buffer,\n    or the literal `\u003cbuffer-root\u003e` which corresponds to the project root\n    directory of the active buffer.\n  - `name` name of the floaterm\n  - `silent` If `--silent` is given, spawn a floaterm but not open the window,\n    you may toggle it afterwards\n  - `disposable` If `--disposable` is given, the floaterm will be destroyed\n    once it is hidden.\n  - `title` see `g:floaterm_title`\n  - `width` see `g:floaterm_width`\n  - `height` see `g:floaterm_height`\n  - `opener` see `g:floaterm_opener`\n  - `wintype` see `g:floaterm_wintype`\n  - `position` see `g:floaterm_position`\n  - `autoclose` see `g:floaterm_autoclose`\n  - `borderchars` see `g:floaterm_borderchars`\n  - `titleposition` see `g:floaterm_titleposition`\n- This command basically shares the consistent behaviors with the builtin `:terminal`:\n  - The special characters(`:help cmdline-special`) such as `%` and `\u003ccfile\u003e`\n    will be auto-expanded, to get standalone characters, use `\\` followed by\n    the corresponding character(e.g., `\\%`).\n  - Note that `\u003cbar\u003e`(i.e., `|`) will be seen as an argument of the command,\n    therefore it can not be followed by another Vim command.\n- If execute this command with a range, i.e., `'\u003c,'\u003e:FloatermNew ...`, the\n  selected lines will be sent to the created floaterm. For example, see\n  [python repl use case](#python) below.\n- Use `\u003cTAB\u003e` to get completion.\n\nFor example, the command\n\n```vim\n:FloatermNew --height=0.6 --width=0.4 --wintype=float --name=floaterm1 --position=topleft --autoclose=2 ranger --cmd=\"cd ~\"\n```\n\nwill open a new floating/popup floaterm instance named `floaterm1` running\n`ranger --cmd=\"cd ~\"` in the `topleft` corner of the main window.\n\nThe following command allows you to compile and run your C code in the floaterm window:\n\n```vim\n:FloatermNew --autoclose=0 gcc % -o %\u003c \u0026\u0026 ./%\u003c\n```\n\n#### `:FloatermPrev` Switch to the previous floaterm instance\n\n#### `:FloatermNext` Switch to the next floaterm instance\n\n#### `:FloatermFirst` Switch to the first floaterm instance\n\n#### `:FloatermLast` Switch to the last floaterm instance\n\n#### `:FloatermUpdate [options]` Update floaterm window attributes(`height`, `width`, etc.).\n\n- The `options` is the same as in `:FloatermNew` (except `--silent`).\n- Use `\u003cTAB\u003e` to get completion.\n\n#### `:[N]FloatermToggle[!] [floaterm_name]` Open or hide the floaterm window.\n\n- If `N` is given, toggle the floaterm whose buffer number is `N`\n- If `floaterm_name` is given, toggle the floaterm instance whose `name`\n  attribute is `floaterm_name`. Otherwise create a new floaterm named\n  `floaterm_name`.\n- Use `\u003cTAB\u003e` to get completion.\n- If `!` is given, toggle all floaterms (`:FloatermHide!` or `: FloatermShow!`)\n\n#### `:[N]FloatermShow[!] [floaterm_name]` Show the current floaterm window.\n\n- If `N` is given, show the floaterm whose buffer number is `N`\n- If `floaterm_name` is given, show the floaterm named `floaterm_name`.\n- If `!` is given, show all floaterms (If multiple floaterms have the same\n  position attribute, only one of them will be show)\n\n#### `:[N]FloatermHide[!] [floaterm_name]` Hide the current floaterms window.\n\n- If `N` is given, hide the floaterm whose buffer number is `N`\n- If `floaterm_name` is given, show the floaterm named `floaterm_name`.\n- If `!` is given, hide all floaterms\n\n#### `:[N]FloatermKill[!] [floaterm_name]` Kill the current floaterm instance\n\n- If `N` is given, kill the floaterm whose buffer number is `N`\n- If `floaterm_name` is given, kill the floaterm instance named `floaterm_name`.\n- If `!` is given, kill all floaterms\n\n#### `:FloatermSend[!] [--name=floaterm_name] [cmd]` Send command to a job in floaterm.\n\n- If `--name=floaterm_name` is given, send lines to the floaterm instance\n  whose `name` is `floaterm_name`. Otherwise use the current floaterm.\n- If `cmd` is given, it will be sent to floaterm and selected lines will be ignored.\n- This command can also be used with a range, i.e., `'\u003c,'\u003e:FloatermSend [--name=floaterm_name]`\n  to send selected lines to a floaterm.\n  - If `cmd` is given, the selected lines will be ignored.\n  - If use this command with a `!`, i.e., `'\u003c,'\u003e:FloatermSend! [--name=floaterm_name]`\n    the common white spaces in the beginning of lines\n    will be trimmed while the relative indent between lines will still be\n    kept.\n- Use `\u003cTAB\u003e` to get completion.\n- Examples\n  ```vim\n  :FloatermSend                        \" Send current line to the current floaterm (execute the line in the terminal)\n  :FloatermSend --name=ft1             \" Send current line to the floaterm named ft1\n  :FloatermSend ls -la                 \" Send `ls -la` to the current floaterm\n  :FloatermSend --name=ft1 ls -la      \" Send `ls -la` to the floaterm named ft1\n  :23FloatermSend ...                  \" Send the line 23 to floaterm\n  :1,23FloatermSend ...                \" Send lines between line 1 and line 23 to floaterm\n  :'\u003c,'\u003eFloatermSend ...               \" Send lines selected to floaterm(visual block selection are supported)\n  :%FloatermSend ...                   \" Send the whole buffer to floaterm\n  ```\n\n### Options\n\n#### **`g:floaterm_shell`**\n\nType `String`. Default: `\u0026shell`\n\n#### **`g:floaterm_title`**\n\nType `String`. Show floaterm info(e.g., `'floaterm: 1/3'` implies there are 3\nfloaterms in total and the current is the first one) at the top left corner of\nfloaterm window.\n\nDefault: `'floaterm: $1/$2'`(`$1` and `$2` will be substituted by 'the index of\nthe current floaterm' and 'the count of all floaterms' respectively)\n\nExample: `'floaterm($1|$2)'`\n\n#### **`g:floaterm_wintype`**\n\nType `String`. `'float'`(nvim's floating or vim's popup) by default. Set it to\n`'split'` or `'vsplit'` if you don't want to use floating or popup window.\n\n#### **`g:floaterm_width`**\n\nType `Number` (number of columns) or `Float` (between 0 and 1). If `Float`,\nthe width is relative to `\u0026columns`.\n\nDefault: `0.6`\n\n#### **`g:floaterm_height`**\n\nType `Number` (number of lines) or `Float` (between 0 and 1). If `Float`, the\nheight is relative to `\u0026lines`.\n\nDefault: `0.6`\n\n#### **`g:floaterm_position`**\n\nType `String`. The position of the floating window. Available values:\n\n- If `wintype` is `split`/`vsplit`: `'leftabove'`, `'aboveleft'`,\n  `'rightbelow'`, `'belowright'`, `'topleft'`, `'botright'`. Default:\n  `'botright'`.\n\n  It's recommended to have a look at those options meanings, e.g. `:help :leftabove`.\n\n- If `wintype` is `float`: `'top'`, `'bottom'`, `'left'`, `'right'`,\n  `'topleft'`, `'topright'`, `'bottomleft'`, `'bottomright'`, `'center'`,\n  `'auto'(at the cursor place)`. Default: `'center'`\n\nIn addition, there is another option `'random'` which allows to pick a random\nposition from above when (re)opening a floaterm window.\n\n#### **`g:floaterm_borderchars`**\n\nType `String`. 8 characters of the floating window border (top, right, bottom,\nleft, topleft, topright, botright, botleft).\n\nDefault: `─│─│┌┐┘└`\n\n#### **`g:floaterm_rootmarkers`**\n\nType `List` of `String`. Markers used to detect the project root directory for `--cwd=\u003croot\u003e`\nor `--cwd=\u003cbuffer-root\u003e`.\n\nDefault: `['.project', '.git', '.hg', '.svn', '.root']`\n\n#### **`g:floaterm_giteditor`**\n\nType `Boolean`. Whether to override `$GIT_EDITOR` in floaterm terminals so git commands can\nopen open an editor in the same neovim instance. See [git](#git) for details.\nThis flag also overrides `$HGEDITOR` for Mercurial.\n\nDefault: `v:true`\n\n#### **`g:floaterm_opener`**\n\nType `String`. Command used for opening a file in the outside nvim from within `:terminal`.\n\nAvailable: `'edit'`, `'split'`, `'vsplit'`, `'tabe'`, `'drop'` or\n[user-defined commands](https://github.com/voldikss/vim-floaterm/issues/259)\n\nDefault: `'split'`\n\n#### **`g:floaterm_autoclose`**\n\nType `Number`. Whether to close floaterm window once the job gets finished.\n\n- `0`: Always do NOT close floaterm window\n- `1`: Close window if the job exits normally, otherwise stay it with messages\n  like `[Process exited 101]`\n- `2`: Always close floaterm window\n\nDefault: `1`.\n\n#### **`g:floaterm_autohide`**\n\nType `Number`. Whether to hide previous floaterms before switching to or\nopening a another one.\n\n- `0`: Always do NOT hide previous floaterm windows\n- `1`: Only hide those whose position (`b:floaterm_position`) is identical to\n  that of the floaterm which will be opened\n- `2`: Always hide them\n\nDefault: `1`.\n\n#### **`g:floaterm_autoinsert`**\n\nType `Boolean`. Whether to enter Terminal-mode after opening a floaterm.\n\nDefault: `v:true`\n\n#### **`g:floaterm_titleposition`**\n\nType `String`. The position of the floaterm title.\n\nAvailable: `'left'`, `'center'`, `'right'`.\n\nDefault: `'left'`\n\n### Keymaps\n\nThis plugin doesn't supply any default mappings. Here are the configuration examples.\n\n```vim\n\" Configuration example\nlet g:floaterm_keymap_new    = '\u003cF7\u003e'\nlet g:floaterm_keymap_prev   = '\u003cF8\u003e'\nlet g:floaterm_keymap_next   = '\u003cF9\u003e'\nlet g:floaterm_keymap_toggle = '\u003cF12\u003e'\n```\n\nYou can also use other keys as shown below:\n\n```vim\nlet g:floaterm_keymap_new = '\u003cLeader\u003eft'\n```\n\nAll options for the mappings are listed below:\n\n- `g:floaterm_keymap_new`\n- `g:floaterm_keymap_prev`\n- `g:floaterm_keymap_next`\n- `g:floaterm_keymap_first`\n- `g:floaterm_keymap_last`\n- `g:floaterm_keymap_hide`\n- `g:floaterm_keymap_show`\n- `g:floaterm_keymap_kill`\n- `g:floaterm_keymap_toggle`\n\nNote that the key mappings are set from the [plugin/floaterm.vim](./plugin/floaterm.vim),\nso if you are using on-demand loading feature provided by some plugin-managers,\nthe keymap above won't take effect(`:help load-plugins`). Then you have to\ndefine the key bindings by yourself. For example,\n\n```vim\nnnoremap   \u003csilent\u003e   \u003cF7\u003e    :FloatermNew\u003cCR\u003e\ntnoremap   \u003csilent\u003e   \u003cF7\u003e    \u003cC-\\\u003e\u003cC-n\u003e:FloatermNew\u003cCR\u003e\nnnoremap   \u003csilent\u003e   \u003cF8\u003e    :FloatermPrev\u003cCR\u003e\ntnoremap   \u003csilent\u003e   \u003cF8\u003e    \u003cC-\\\u003e\u003cC-n\u003e:FloatermPrev\u003cCR\u003e\nnnoremap   \u003csilent\u003e   \u003cF9\u003e    :FloatermNext\u003cCR\u003e\ntnoremap   \u003csilent\u003e   \u003cF9\u003e    \u003cC-\\\u003e\u003cC-n\u003e:FloatermNext\u003cCR\u003e\nnnoremap   \u003csilent\u003e   \u003cF12\u003e   :FloatermToggle\u003cCR\u003e\ntnoremap   \u003csilent\u003e   \u003cF12\u003e   \u003cC-\\\u003e\u003cC-n\u003e:FloatermToggle\u003cCR\u003e\n```\n\n### Highlights\n\nThere are two `highlight-groups` to specify the color of floaterm (also the\nborder color if `g: floaterm_wintype` is `'float'`) window.\n\nTo customize, use `hi` command together with the colors you prefer.\n\n```vim\n\" Configuration example\n\n\" Set floaterm window's background to black\nhi Floaterm guibg=black\n\" Set floating window border line color to cyan, and background to orange\nhi FloatermBorder guibg=orange guifg=cyan\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/91368959-fee00f00-e83c-11ea-9002-cab992d30794.png\"/\u003e\n\u003c/details\u003e\n\nBesides, there is a neovim only highlight group which can be used to configure\nno-current-focused window(`:help NormalNC`).\n\n```vim\n\" Configuration example\n\n\" Set floaterm window foreground to gray once the cursor moves out from it\nhi FloatermNC guifg=gray\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/91380259-28a62f80-e857-11ea-833f-11160d15647a.gif\"/\u003e\n\u003c/details\u003e\n\n### Autocmd\n\n```vim\nautocmd User FloatermOpen        \" triggered after opening a new/existed floaterm\n```\n\n## Advanced Topics\n\n### Use with command line tools\n\nThe following cases should work both in Vim and NeoVim unless otherwise\nspecifically noted.\n\n#### floaterm\n\nNormally if you run `vim/nvim somefile.txt` within the builtin terminal, you\nwould get another nvim/vim instance running in the subprocess.\n\n[Floaterm](https://github.com/voldikss/vim-floaterm/tree/master/bin), which is\na builtin script in this plugin, allows you to open files from within `: terminal`\nwithout starting a nested nvim. To achieve that, just literally replace\n`vim/nvim` with `floaterm`, e.g. `floaterm somefile.txt`\n\nP.S.\n\n- [#208](https://github.com/voldikss/vim-floaterm/issues/208#issuecomment-747829311)\n  describes how to use `gf` in the floating terminal window.\n- `floaterm` is too long to type? set alias in your `bashrc`, e.g. `alias f=floaterm`\n- For configurable open action, refer to [g:floaterm_opener](#gfloaterm_opener)\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/91380257-27750280-e857-11ea-8d49-d760c009fee0.gif\"/\u003e\n\u003c/details\u003e\n\n#### [git](https://git-scm.com/)\n\nExecute `git commit` in the terminal window without starting a nested vim/nvim.\n\nRefer to [g:floaterm_giteditor](#gfloaterm_giteditor) to disable this behavior.\n\nRefer to [g:floaterm_opener](#gfloaterm_opener) for configurable open action\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/91380268-2cd24d00-e857-11ea-8dbd-d39a0bbb105e.gif\"/\u003e\n\u003c/details\u003e\n\n#### [fzf](https://github.com/junegunn/fzf)\n\nThis plugin has implemented a [wrapper](./autoload/floaterm/wrapper/fzf.vim)\nfor `fzf` command. So it can be used as a tiny fzf plugin.\n\nTry `:FloatermNew fzf` or even wrap this to a new command like this:\n\n```vim\ncommand! FZF FloatermNew fzf\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/107140144-10d0ec80-695b-11eb-8c2f-8bd42ae26e6d.gif\"/\u003e\n\u003c/details\u003e\n\n#### [ripgrep](https://github.com/BurntSushi/ripgrep)\n\n_Requirements_:\n\n- [fzf](https://github.com/junegunn/fzf)\n- [vim-ripgrep](https://github.com/jremmen/vim-ripgrep)\n\nThis plugin has implemented a [wrapper](./autoload/floaterm/wrapper/rg.vim)\nfor `rg` command.\n\nTry `:FloatermNew rg` or create yourself a new command like this:\n\n```vim\ncommand! Rg FloatermNew --width=0.8 --height=0.8 rg\n```\n\nor map via `.vimrc`\n\n```vim\n\" Hotkey: \\ + rg\nnmap \u003cleader\u003erg :Rg\u003cCR\u003e\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\nYou can use \u003cbutton\u003eAlt-A\u003c/button\u003e to select all files and \u003cbutton\u003eAlt-D\u003c/button\u003e to deselect them.\nUse \u003cbutton\u003eCtrl-/\u003c/button\u003e to toggle preview.\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/107148083-4c37df00-698c-11eb-80fb-ccfd94fc4419.gif\"/\u003e\n\u003c/details\u003e\n\n#### [broot](https://github.com/Canop/broot)\n\nThis plugin has implemented a [wrapper](./autoload/floaterm/wrapper/broot.vim) for `broot`.\n\nTry `:FloatermNew broot` or create yourself a new command like this:\n\n```vim\ncommand! Broot FloatermNew --width=0.8 --height=0.8 broot\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/109648379-83696c80-7b95-11eb-8776-071b816cce2d.gif\"/\u003e\n\u003c/details\u003e\n\n#### [fff](https://github.com/dylanaraps/fff)\n\nThere is also an [fff wrapper](./autoload/floaterm/wrapper/fff.vim)\n\nTry `:FloatermNew fff` or define a new command:\n\n```vim\ncommand! FFF FloatermNew fff\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/1472981/75105718-9f315d00-567b-11ea-82d1-6f9a6365391f.gif\"/\u003e\n\u003c/details\u003e\n\n#### [nnn](https://github.com/jarun/nnn)\n\nThere is also an [nnn wrapper](./autoload/floaterm/wrapper/nnn.vim)\n\nTry `:FloatermNew nnn` or define a new command:\n\n```vim\ncommand! NNN FloatermNew nnn\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/91380278-322f9780-e857-11ea-8b1c-d40fc91bb07d.gif\"/\u003e\n\u003c/details\u003e\n\n#### [xplr](https://github.com/sayanarijit/xplr)\n\nThere is also an [xplr wrapper](./autoload/floaterm/wrapper/xplr.vim)\n\nTry `:FloatermNew xplr` or define a new command:\n\n```vim\ncommand! XPLR FloatermNew xplr\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://s4.gifyu.com/images/ft-xplr9173d6a849e3f6b9.gif\"/\u003e\n\u003c/details\u003e\n\n#### [lf](https://github.com/gokcehan/lf)\n\nThere is also an [lf wrapper](./autoload/floaterm/wrapper/lf.vim).\nIt is recommened to use [lf.vim](https://github.com/ptzz/lf.vim) which is an lf wrapper with more features (Overriding netrw, Lfcd, etc.).\n\nTry `:FloatermNew lf` or define a new command:\n\n```vim\ncommand! LF FloatermNew lf\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/91380274-3065d400-e857-11ea-86df-981adddc04c6.gif\"/\u003e\n\u003c/details\u003e\n\n#### [ranger](https://github.com/ranger/ranger)\n\nThis plugin can also be a handy ranger plugin since it also has a [ranger wrapper](./autoload/floaterm/wrapper/ranger.vim)\n\nTry `:FloatermNew ranger` or define a new command:\n\n```vim\ncommand! Ranger FloatermNew ranger\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/91380284-3360c480-e857-11ea-9966-34856592d487.gif\"/\u003e\n\u003c/details\u003e\n\n#### [joshuto](https://github.com/kamiyaa/joshuto)\n\nThis plugin can also be a handy joshuto plugin since it also has a [joshuto wrapper](./autoload/floaterm/wrapper/joshuto.vim)\n\nTry `:FloatermNew joshuto` or define a new command:\n\n```vim\ncommand! Joshuto FloatermNew joshuto\n```\n\n#### [vifm](https://github.com/vifm/vifm)\n\nThere is also a [vifm wrapper](./autoload/floaterm/wrapper/vifm.vim)\n\nTry `:FloatermNew vifm` or define a new command:\n\n```vim\ncommand! Vifm FloatermNew vifm\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/43941510/77137476-3c888100-6ac2-11ea-90f2-2345c881aa8f.gif\"/\u003e\n\u003c/details\u003e\n\n#### [yazi](https://github.com/sxyazi/yazi)\n\nThere is also a [yazi wrapper](./autoload/floaterm/wrapper/yazi.vim)\n\nTry `:FloatermNew yazi` or define a new command:\n\n```vim\ncommand! Yazi FloatermNew yazi\n```\n\n#### [lazygit](https://github.com/jesseduffield/lazygit)\n\nFurthermore, you can also use other command-line programs, such as lazygit, htop, ncdu, etc.\n\nUse `lazygit` for instance:\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/74755376-0f239a00-52ae-11ea-9261-44d94abe5924.png\"/\u003e\n\u003c/details\u003e\n\n#### [python](https://www.python.org/)\n\nUse `:FloatermNew python` to open a python shell. After that you can use\n`: FloatermSend` to send lines to the Python interactive shell.\n\nOr you can just select lines and execute `:'\u003c,'\u003eFloatermNew --wintype=split python`, then the\nselected lines will be sent and executed once a python repl floaterm window is\nopened.\n\nThis can also work for other languages which have interactive shells, such as lua, node, etc.\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/91380286-352a8800-e857-11ea-800c-ac54efa7dd72.gif\"/\u003e\n\u003c/details\u003e\n\n### Use with other plugins\n\n#### [vim-clap](https://github.com/liuchengxu/vim-clap)\n\nUse vim-clap to switch/preview floating terminal buffers.\n\nInstall [clap-floaterm](https://github.com/voldikss/clap-floaterm) and try `:Clap floaterm`\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/91380243-217f2180-e857-11ea-9f64-46e8676adc11.gif\"/\u003e\n\u003c/details\u003e\n\n#### [denite.nvim](https://github.com/Shougo/denite.nvim)\n\nUse denite to switch/preview/open floating terminal buffers.\n\nInstall [denite-floaterm](https://github.com/delphinus/denite-floaterm) and try `:Denial floaterm`\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/1239245/73604753-17ef4d00-45d9-11ea-967f-ef75927e2beb.gif\"/\u003e\n\u003c/details\u003e\n\n#### [coc.nvim](https://github.com/neoclide/coc.nvim)\n\nUse CocList to switch/preview/open floating terminal buffers.\n\nInstall [coc-floaterm](https://github.com/voldikss/coc-floaterm) and try `:CocList floaterm`\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/91380254-25ab3f00-e857-11ea-9733-d0ae5a954848.gif\"/\u003e\n\u003c/details\u003e\n\n#### [fzf](https://github.com/junegunn/fzf)\n\nInstall [fzf-floaterm](https://github.com/voldikss/fzf-floaterm) and try `:Floaterms`\n\n#### [LeaderF](https://github.com/Yggdroot/LeaderF)\n\nInstall [LeaderF-floaterm](https://github.com/voldikss/LeaderF-floaterm) and try `:Leaderf floaterm`\n\n#### [asynctasks.vim](https://github.com/skywind3000/asynctasks.vim) | [asyncrun.vim](https://github.com/skywind3000/asyncrun.vim)\n\nThis plugin can be a runner for asynctasks.vim or asyncrun.vim. See\n[asyncrun.extra](https://github.com/skywind3000/asyncrun.extra) for the\ninstallation and usage.\n\n\u003cdetails\u003e\n\u003csummary\u003eDemo\u003c/summary\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/20282795/104123344-b3f70c00-5385-11eb-9f61-0a5703ba78f5.gif\"/\u003e\n\u003c/details\u003e\n\n### How to define more wrappers\n\nThe wrapper script must be located in `autoload/floaterm/wrapper/` directory,\ne.g., `autoload/floaterm/wrapper/fzf.vim`.\n\nThere are two ways for a command to be spawned:\n\n- To be executed after spawning `$SHELL`. Here is the old implementation of\n  [fzf wrapper](./autoload/floaterm/wrapper/fzf.vim)\n\n  ```vim\n  function! floaterm#wrapper#fzf#(cmd, jobopts, config) abort\n    return [v:true, 'floaterm $(fzf)']\n  endfunction\n  ```\n\n  The code above returns a list. `floaterm $(fzf)` is the command to be\n  executed. `v:true` means the command will be executed after the `\u0026shell`\n  startup.\n\n- To be executed through `termopen()`/`term_start()` function, in that case, a\n  callback option can be provided. See [fzf wrapper](./autoload/floaterm/wrapper/fzf.vim)\n\n  ```vim\n  function! floaterm#wrapper#fzf#(cmd, jobopts, config) abort\n    let s:fzf_tmpfile = tempname()\n    let cmd = a:cmd . ' \u003e ' . s:fzf_tmpfile\n    let a:jobopts.on_exit = funcref('s:fzf_callback')\n    return [v:false, cmd]\n  endfunction\n\n  function! s:fzf_callback(...) abort\n    if filereadable(s:fzf_tmpfile)\n      let filenames = readfile(s:fzf_tmpfile)\n      if !empty(filenames)\n        if has('nvim')\n          call floaterm#window#hide(bufnr('%'))\n        endif\n        let locations = []\n        for filename in filenames\n          let dict = {'filename': fnamemodify(filename, ':p')}\n          call add(locations, dict)\n        endfor\n        call floaterm#util#open(locations)\n      endif\n    endif\n  endfunction\n  ```\n\n  In the example above, after executing `:FloatermNew fzf`, function\n  `floaterm#wrapper#fzf#` will return\n\n  ```vim\n  [v:false, 'fzf \u003e /tmp/atmpfilename'].\n  ```\n\n  Here `v:false` means `cmd`\n\n  ```vim\n  fzf \u003e /tmp/atmpfilename\n  ```\n\n  will be passed through `termopen()`(neovim) or `term_start()`(vim). As the\n  result, an fzf interactive will be opened in a floaterm window.\n\n  When user picks a file using `ENTER`, fzf exits and the filepath will be\n  written in `/tmp/atmpfilename` and `s:fzf_callback()` will be invoked to\n  open the file. Note that the function `s: fzf_callback()` is registered by\n\n  ```vim\n  let a:jobopts.on_exit = funcref('s:fzf_callback')\n  ```\n\n  The variable `a:jobopts` in the above code will be eventually passed to\n  `termopen()`(neovim) or `term_start()`(vim). For more info, see\n  `:help jobstart-options`(neovim) or `:help job-options`(vim)\n\n### How to write sources for fuzzy finder plugins\n\nFunction `floaterm#buflist#gather()` returns a list contains all the floaterm buffers.\n\nFunction `floaterm#terminal#open_existing({bufnr})` opens the floaterm whose buffer number is `{bufnr}`.\n\nFor reference, see [floaterm source for LeaderF](https://github.com/voldikss/LeaderF-floaterm/blob/master/autoload/lf_floaterm.vim).\n\n## Contributing\n\n- Improve the documentation\n- Help resolve issues labeled as [help wanted](https://github.com/voldikss/vim-floaterm/issues?q=is%3Aissue+label%3A%22help+wanted%22)\n\n## FAQ\n\nhttps://github.com/voldikss/vim-floaterm/issues?q=label%3AFAQ\n\n## Breaking Changes\n\nhttps://github.com/voldikss/vim-floaterm/issues?q=label%3A%22breaking+change%22\n\n## Related projects\n\n- [vim-floaterm-repl](https://github.com/windwp/vim-floaterm-repl)\n- [coc-floaterm](https://github.com/voldikss/coc-floaterm)\n- [fzf-floaterm](https://github.com/voldikss/fzf-floaterm)\n- [popc-floaterm](https://github.com/yehuohan/popc-floaterm)\n- [LeaderF-floaterm](https://github.com/voldikss/LeaderF-floaterm)\n\n## Credits\n\n- [Vim](https://github.com/vim/vim/) and [Neovim](https://github.com/neovim/neovim/) the editor God\n\n- [vim-terminal-help](https://github.com/skywind3000/vim-terminal-help/blob/master/tools/utils/drop)\n\n- [edita.vim](https://github.com/lambdalisue/edita.vim)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoldikss%2Fvim-floaterm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoldikss%2Fvim-floaterm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoldikss%2Fvim-floaterm/lists"}