Adds (experimental) iTerm2 Mac touchbar support to vim
and neovim
.
This uses a feature exclusive to iTerm2. It will not work with the Apple Terminal.app.
Just install this plugin with your favorite Vim plugin manager!
eth-p/vim-it2-touchbar
Using the touch bar should be pretty simple.
Just add the following to your .vimrc
/init.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.
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.