https://github.com/eth-p/vim-it2-touchbar
A Vim and Neovim plugin that adds Apple Touch Bar support when using iTerm2.
https://github.com/eth-p/vim-it2-touchbar
apple-touchbar mac-touchbar neovim neovim-plugin touchbar vim vim-plugin
Last synced: 3 months ago
JSON representation
A Vim and Neovim plugin that adds Apple Touch Bar support when using iTerm2.
- Host: GitHub
- URL: https://github.com/eth-p/vim-it2-touchbar
- Owner: eth-p
- License: mit
- Created: 2021-05-15T02:57:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-23T23:53:09.000Z (7 months ago)
- Last Synced: 2025-04-03T08:40:35.551Z (6 months ago)
- Topics: apple-touchbar, mac-touchbar, neovim, neovim-plugin, touchbar, vim, vim-plugin
- Language: Vim Script
- Homepage:
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# vim-it2-touchbar
Adds (experimental) iTerm2 Mac touchbar support to `vim` and `neovim`.
**This uses a feature exclusive to [iTerm2](https://iterm2.com/). It will not work with the Apple Terminal.app.**
## Installation
Just install this plugin with your favorite Vim plugin manager!
```
eth-p/vim-it2-touchbar
```## Setup
Using the touch bar should be pretty simple.
Just add the following to your `.vimrc`/`init.vim`:```vim
function TouchBar()
TouchBarLabel F1 "label here"
" Add remappings here if necessary.
endfunction
```Whenever vim is opened/closed/suspended/resumed, it will set or restore the touch bar accordingly.
## It doesn't work/it's slow!
To be fair, it's experimental *and* a bit of a hack. Vim doesn't offer any streamlined way to write to the user's tty, and some tricks had to be utilized.