@@ -12,14 +12,15 @@ The MacVim Graphical User Interface *macvim* *gui-macvim*
12
12
4. Special colors | macvim-colors |
13
13
5. Menus | macvim-menus |
14
14
6. Toolbar | macvim-toolbar |
15
- 7. Dialogs | macvim-dialogs |
16
- 8. System services | macvim-services |
17
- 9. mvim:// URL handler | macvim-url-handler |
18
- 10. Keyboard shortcuts | macvim-shortcuts |
19
- 11. Trackpad gestures | macvim-gestures |
20
- 12. International | macvim-international |
21
- 13. Known bugs/missing features | macvim-todo |
22
- 14. Hints | macvim-hints |
15
+ 7. Touch Bar | macvim-touchbar |
16
+ 8. Dialogs | macvim-dialogs |
17
+ 9. System services | macvim-services |
18
+ 10. mvim:// URL handler | macvim-url-handler |
19
+ 11. Keyboard shortcuts | macvim-shortcuts |
20
+ 12. Trackpad gestures | macvim-gestures |
21
+ 13. International | macvim-international |
22
+ 14. Known bugs/missing features | macvim-todo |
23
+ 15. Hints | macvim-hints |
23
24
24
25
Other relevant documentation:
25
26
| gui.txt | For generic items of the GUI.
@@ -345,7 +346,7 @@ associated: a title, a key equivalent and an action message. When a menu is
345
346
displayed the title is shown on the left and the key equivalent (if any) is
346
347
shown on the right. Key equivalents enable you to access a menu item using
347
348
the keyboard instead of having to use the mouse. When a menu item is clicked
348
- it will send it's associated action message. Actions can be used to instruct
349
+ it will send its associated action message. Actions can be used to instruct
349
350
MacVim to paste some text (paste:), open a new window (newWindow:), etc.
350
351
Certain actions are standard throughout OS X which is why MacVim must be able
351
352
to set these for each menu item. (E.g. the menu item "Edit.Paste" must be
@@ -467,19 +468,47 @@ empty space which will shink or expand so that the items to the right of it
467
468
are right-aligned. A space (flexspace) will be created for any toolbar item
468
469
whose name begins with "-space" ("-flexspace") and ends with "-"
469
470
470
- Toolbar icons should be tiff, png or icns , of dimension 32x32 or 24x24 pixels.
471
- The larger size is used when 'tbis' is "medium" or "large", otherwise the
472
- smaller size is used (which is the default). If the icon file only contains
473
- one dimension then Mac OS X will scale the icon to the appropriate dimension
474
- if necessary. To avoid this, use a file format which supports multiple
475
- resolutions (such as icns) and provide both 32x32 and 24x24 versions of the
476
- icon.
471
+ Toolbar icons should be tiff, png, icns, or heic , of dimension 32x32 or 24x24
472
+ pixels. The larger size is used when 'tbis' is "medium" or "large", otherwise
473
+ the smaller size is used (which is the default). If the icon file only
474
+ contains one dimension then Mac OS X will scale the icon to the appropriate
475
+ dimension if necessary. To avoid this, use a file format which supports
476
+ multiple resolutions (such as icns) and provide both 32x32 and 24x24 versions
477
+ of the icon.
477
478
478
479
Note: Only a subset of the builtin toolbar items presently have icons. If no
479
480
icon can be found a warning triangle is displayed instead.
480
481
481
482
==============================================================================
482
- 7. Dialogs *macvim-dialogs*
483
+ 7. Touch Bar *macvim-touchbar*
484
+
485
+ Touch Bar in MacVim works similar to the toolbar (see | macvim-toolbar | ). The
486
+ difference is that you use the special menu "TouchBar" instead of "ToolBar": >
487
+ :an TouchBar.Hello :echo "Hello"<CR>
488
+
489
+ The separators work similar to how toolbars work: >
490
+ :an TouchBar.-Sep- <Nop>
491
+ :an TouchBar.-space1- <Nop>
492
+ :an TouchBar.-flexspace2- <Nop>
493
+
494
+ The first example is a Vim separator (see | menu-separator | ) and injects a
495
+ space between two buttons. The second creates a smaller space than a normal
496
+ separator and are specified by names that begin with "-space" and ends with
497
+ "-". The third creates a flexible empty space which will shrink or expand so
498
+ that items after it will be right-aligned, and is specified by names that
499
+ begin with "-flexspace" and ends with "-".
500
+
501
+ You can specify icons for Touch Bar buttons the same way for toolbar icons.
502
+ Touch Bar icons should ideally be 36x36 pixels, and no larger than 44x44
503
+ pixels. You can also use default template icons provided by Apple by using
504
+ their template names. An example: >
505
+ :an icon=NSTouchBarListViewTemplate TouchBar.ShowList <Nop>
506
+
507
+ This feature only works on Mac devices that come with Touch Bars. On the ones
508
+ that don't, nothing will show up.
509
+
510
+ ==============================================================================
511
+ 8. Dialogs *macvim-dialogs*
483
512
484
513
Dialogs can be controlled with the keyboard in two ways. By default each
485
514
button in a dialog is bound to a key. The button that is highlighted by blue
@@ -498,7 +527,7 @@ select the current button. The current button is indicated with a blue
498
527
outline.
499
528
500
529
==============================================================================
501
- 8 . System services *macvim-services*
530
+ 9 . System services *macvim-services*
502
531
503
532
MacVim supports two system services. These can be accessed from the MacVim
504
533
submenu in the Services menu or by right-clicking a selection. For services
@@ -516,7 +545,7 @@ The services respect the "Open files from applications" setting in the general
516
545
preferences.
517
546
518
547
==============================================================================
519
- 9 . mvim:// URL handler *mvim://* *macvim-url-handler*
548
+ 10 . mvim:// URL handler *mvim://* *macvim-url-handler*
520
549
521
550
MacVim supports a custom URL handler for "mvim://" URLs. The handler is
522
551
supposed to be compatible to TextMate's URL scheme as documented at >
@@ -537,7 +566,7 @@ will open the file /etc/profile on line 20 when clicked in a web browser.
537
566
Note that url has to be a file:// url pointing to an existing local file.
538
567
539
568
==============================================================================
540
- 10 . Keyboard shortcuts *macvim-shortcuts*
569
+ 11 . Keyboard shortcuts *macvim-shortcuts*
541
570
542
571
Most keyboard shortcuts in MacVim are bound to menu items and can be
543
572
discovered by looking through the menus (see | macvim-menus | on how to create
@@ -617,7 +646,7 @@ sometimes be slightly involved. Here are all the things you need to consider:
617
646
- A few command key mappings are set up by MacVim, see | cmd-movement | .
618
647
619
648
==============================================================================
620
- 11 . Trackpad gestures *macvim-gestures*
649
+ 12 . Trackpad gestures *macvim-gestures*
621
650
622
651
MacVim supports trackpad swipe gestures. By default this can be used to
623
652
navigate back/forward in the help (try it!).
@@ -652,7 +681,7 @@ As another example, here is how to switch buffers by swiping left/right: >
652
681
See the section on | key-mapping | for more help on how to map keys.
653
682
654
683
==============================================================================
655
- 12 . International *macvim-international*
684
+ 13 . International *macvim-international*
656
685
657
686
When editing non-English text it may be convenient to keep separate keyboard
658
687
layouts for normal and insert mode. This is supported via the 'imd' option on
@@ -673,7 +702,7 @@ wrong layout when going back to normal mode, then select the layout you want
673
702
to use in normal mode and type ":set imd" followed by ":set noimd".
674
703
675
704
==============================================================================
676
- 13 . Known bugs/missing features *macvim-todo*
705
+ 14 . Known bugs/missing features *macvim-todo*
677
706
678
707
This list is by no means exhaustive, it only enumerates some of the more
679
708
prominent bugs/missing features.
@@ -697,7 +726,7 @@ This is also the best place for making feature requests as well as for asking
697
726
general questions about MacVim.
698
727
699
728
==============================================================================
700
- 14 . Hints *macvim-hints*
729
+ 15 . Hints *macvim-hints*
701
730
702
731
In this section some general (not necessarily MacVim specific) hints are
703
732
given.
0 commit comments