Last active
August 23, 2023 02:35
-
-
Save 0x4a616e/31f58e02ffd5d49bb0865c3dce0b5a08 to your computer and use it in GitHub Desktop.
MacVim Touch Bar buttons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" MacVim Touch Bar support | |
" ======================== | |
" Since version 8.0 (I think), MacVim natively supports the macOS touch bar. By default it just contains | |
" one button to toggle fullscreen mode. To add some more useful buttons, just copy this into your .vimrc | |
" | |
" More details about the syntax can be found here: https://github.com/macvim-dev/macvim/blob/master/runtime/doc/gui_mac.txt | |
" For a list of touch bar image names, see https://developer.apple.com/design/human-interface-guidelines/macos/touch-bar/touch-bar-icons-and-images/ | |
" Toggle NerdTree | |
an icon=NSTouchBarSidebarTemplate TouchBar.NerdTree :NERDTreeToggle<CR> | |
an TouchBar.-flexspace2- <Nop> | |
" List buffers | |
an icon=NSTouchBarListViewTemplate TouchBar.ListBuffers :ls<CR> | |
" Delete buffer | |
an icon=NSTouchBarDeleteTemplate TouchBar.Delete :bd<CR> | |
an TouchBar.-Sep- <Nop> | |
" Previous buffer | |
an icon=NSTouchBarGoBackTemplate TouchBar.GoBack :bp<CR> | |
" Next buffer | |
an icon=NSTouchBarGoForwardTemplate TouchBar.GoForward :bn<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment