@@ -514,10 +514,17 @@ icon can be found a warning triangle is displayed instead.
514514==============================================================================
5155158. Touch Bar *macvim-touchbar*
516516
517- Touch Bar in MacVim works similar to the toolbar (see | macvim-toolbar | ). The
518- difference is that you use the special menu "TouchBar" instead of "ToolBar": >
517+ Touch Bar in MacVim is configurable, and works similar to the toolbar (see
518+ | macvim-toolbar | ). The difference is that you use the special menu "TouchBar"
519+ instead of "ToolBar": >
519520 :an TouchBar.Hello :echo "Hello"<CR>
520-
521+ <
522+ You can also create submenus. Due to macOS restrictions, submenus can only be
523+ one level deep: >
524+ :an TouchBar.Navigate.Next :next<CR>
525+ :an TouchBar.Navigate.Prev :prev<CR>
526+ <
527+ *macvim-touchbar-separator*
521528The separators work similar to how toolbars work: >
522529 :an TouchBar.-Sep- <Nop>
523530 :an TouchBar.-space1- <Nop>
@@ -530,24 +537,45 @@ separator and are specified by names that begin with "-space" and ends with
530537that items after it will be right-aligned, and is specified by names that
531538begin with "-flexspace" and ends with "-".
532539
540+ *macvim-touchbar-icon*
533541You can specify icons for Touch Bar buttons the same way for toolbar icons.
534542Touch Bar icons should ideally be 36x36 pixels, and no larger than 44x44
535543pixels. You can also use default template icons provided by Apple by using
536544their template names. An example: >
537- :an icon=NSTouchBarListViewTemplate TouchBar.ShowList <Nop>
545+ :an icon=NSTouchBarListViewTemplate TouchBar.ShowList :ls<CR>
546+ <
547+ *macvim-touchbar-title*
548+ By default, the TouchBar buttons will use the menu names as the title. If an
549+ icon is specified, the title will not be shown. You can override this by using
550+ | tmenu | to set a tooltip. The tooltip will be displayed as the title of the
551+ button. If an icon is specified, the tooltip override will be shown alongside
552+ the icion. Example: >
553+ :an icon=NSTouchBarAddTemplate TouchBar.AddItem <Nop>
554+ :tmenu TouchBar.AddItem Add an Item
555+ <
556+ *macvim-touchbar-characterpicker* *macvim-touchbar-emoji*
557+ You can also insert emojis by adding a character picker button (specified by
558+ using a name that begin wtih "-characterpicker" and ends with "-"): >
559+ :inoremenu TouchBar.-characterpicker- <Nop>
538560
539561 This feature only works on Mac devices that come with Touch Bars. On the ones
540562that don't, nothing will show up.
541563
542- *macvim-touchbar-defaults*
564+ *macvim-touchbar-defaults*
543565Here is a list of default Touch Bar buttons that MacVim sets up:
544566
545- *macvim-touchbar-fullscreen*
567+ *macvim-touchbar-fullscreen*
546568 *g:macvim_default_touchbar_fullscreen*
547569EnterFullScreen Touch Bar buttons that allow you to toggle
548- ExitFullScreen | 'fullscreen' | mode. To disable the button , add the
549- following to your vimrc file: >
570+ ExitFullScreen | 'fullscreen' | mode. To disable, add the following to
571+ your vimrc file: >
550572 let g:macvim_default_touchbar_fullscreen=0
573+ <
574+ *g:macvim_default_touchbar_characterpicker*
575+ -characterpicker- Character picker that lets you add special characters
576+ and emojis in insert and terminal modes. To disable,
577+ add the following to your vimrc file: >
578+ let g:macvim_default_touchbar_characterpicker=0
551579
552580==============================================================================
5535819. Dialogs *macvim-dialogs*
0 commit comments