1
- *gui_mac.txt* Last change: 2023 Feb 7
1
+ *gui_mac.txt*
2
2
3
3
MACVIM REFERENCE MANUAL
4
4
@@ -186,34 +186,36 @@ The advantage of using the latter method is that the settings relating to file
186
186
opening in the settings panel are respected, and files open instantly if
187
187
| Quickstart | is enabled.
188
188
189
- Starting MacVim from a terminal~
189
+ Starting MacVim from a terminal ~
190
190
191
- *mvim* *macvim-PATH * *macvim-cmdline*
191
+ *mvim* *macvim-cmdline*
192
192
MacVim comes bundled with a shell script called "mvim" that can be used to
193
193
launch MacVim from the terminal. It's located at: >
194
194
/Applications/MacVim.app/Contents/bin/mvim
195
-
195
+ <
196
+ *macvim-PATH*
196
197
To be able to easily use it, put this folder in your path: >
197
198
/Applications/MacVim.app/Contents/bin
198
199
For example, if you use zsh, you can put the following in `~/.zprofile ` : >
199
200
export PATH="/Applications/MacVim.app/Contents/bin:$PATH"
200
-
201
+ <
201
202
After that, type "mvim" to start MacVim from Terminal. >
202
203
$ mvim
203
204
You can also specify files to open with. >
204
205
$ mvim file ...
205
- Also the bin folder has convenient scripts for diffing and opening file as the file is read-only. >
206
+ Also the bin folder has convenient scripts for diffing and opening file as the
207
+ file is read-only. >
206
208
* Diff: mvimdiff
207
209
* Read-only: mview
208
-
210
+ <
209
211
You can still use the normal "vim", "vimdiff", and "view" commands if you want
210
212
to use non-GUI Vim, and "gvim" to launch MacVim ("gvim" works the same way as
211
213
"mvim").
212
214
213
- Going from terminal to GUI mode~
215
+ Going from terminal to GUI mode ~
214
216
215
217
Once in terminal Vim it is possible to start the MacVim GUI by using the
216
- following command (see | :gui | ):
218
+ following command (see | :gui | ): >
217
219
:gui [++opt] [+cmd] [-f|-b] [files...]
218
220
Note: Forking ("-b") currently does not work.
219
221
@@ -236,8 +238,8 @@ history as the window you just closed (however the next window you open will).
236
238
For these reasons Quickstart is disabled by default.
237
239
238
240
*odbeditor* *external-editor*
239
- MacVim can act as an ' external editor' for macOS applications that support the
240
- ODB Editor Protocol (or the ' external editor' protocol). Each application has
241
+ MacVim can act as an " external editor" for macOS applications that support the
242
+ ODB Editor Protocol (or the " external editor" protocol). Each application has
241
243
different ways of configuring this option, check the application's
242
244
documentation. Once configured properly MacVim can be used to open files in
243
245
such an application.
@@ -310,7 +312,7 @@ As an example, if you have more than one mouse button and would wish to free
310
312
up Ctrl-click so you can bind it to something else, then the appropriate
311
313
command is: >
312
314
defaults write org.vim.MacVim MMTranslateCtrlClick 0
313
-
315
+ <
314
316
If you wish to restore all user defaults to their starting values, open
315
317
Terminal and type: >
316
318
defaults delete org.vim.MacVim
@@ -387,7 +389,7 @@ a Cocoa application when it is not in focus.
387
389
388
390
*Colors.plist*
389
391
Apart from the system colors, it is also possible to use the standard X11
390
- color names (see http ://en.wikipedia.org/wiki/X11_color_names ) which usually
392
+ color names (see https ://en.wikipedia.org/wiki/X11_color_names ) which usually
391
393
come in a file called "rgb.txt". MacVim does not have such a file, instead it
392
394
keeps these colors in a dictionary called "Colors.plist". The key in this
393
395
dictionary is the name of the color and the value is an RGB value on the form
@@ -416,16 +418,16 @@ highlight color when a window becomes inactive.
416
418
==============================================================================
417
419
6. Menus *macvim-menus*
418
420
419
- Default Menus~
421
+ Default Menus ~
420
422
421
423
See | macvim-default-menus | .
422
424
423
- Icons~
425
+ Icons ~
424
426
425
427
Unlike regular Vim, MacVim menus can be customized with an icon. Simply use
426
428
the "icon=" parameter similar to toolbar. See | macvim-toolbar-icon | for usage.
427
429
428
- Customization~
430
+ Customization ~
429
431
430
432
Menus in macOS behave slightly different from other platforms. For that
431
433
reason two new commands have been added to Vim. To understand what these
@@ -620,7 +622,7 @@ The separators work similar to how toolbars work: >
620
622
:an TouchBar.-Sep- <Nop>
621
623
:an TouchBar.-space1- <Nop>
622
624
:an TouchBar.-flexspace2- <Nop>
623
-
625
+ <
624
626
The first example is a Vim separator (see | menu-separator | ) and injects a
625
627
space between two buttons. The second creates a smaller space than a normal
626
628
separator and are specified by names that begin with "-space" and ends with
@@ -668,7 +670,7 @@ ExitFullScreen |'fullscreen'| mode. To disable, add the following to
668
670
and emojis in insert and terminal modes. To disable,
669
671
add the following to your vimrc file: >
670
672
let g:macvim_default_touchbar_characterpicker=0
671
-
673
+ <
672
674
==============================================================================
673
675
9. Looking up data *macvim-lookup*
674
676
@@ -721,10 +723,10 @@ to work, MacVim.app should be located in the /Applications folder. (You might
721
723
have to logout and then login again before macOS detects the MacVim services.)
722
724
723
725
These are the currently supported services:
724
- * New MacVim Buffer With Selection: Create a new buffer and paste the
725
- currently selected text.
726
- * New MacVim Buffer Here: Create a new buffer and set the current
727
- directory to the file or folder that is selected in the Finder.
726
+ * ` New MacVim Buffer With Selection` : Create a new buffer and paste the
727
+ currently selected text.
728
+ * ` New MacVim Buffer Here` : Create a new buffer and set the current
729
+ directory to the file or folder that is selected in the Finder.
728
730
729
731
The services respect the "Open files from applications" setting in the general
730
732
settings.
@@ -733,8 +735,8 @@ settings.
733
735
12. mvim:// URL handler *mvim://* *macvim-url-handler*
734
736
735
737
MacVim supports a custom URL handler for "mvim://" URLs. The handler is
736
- supposed to be compatible to TextMate's URL scheme as documented at >
737
- http ://blog. macromates.com/2007/the-textmate-url-scheme/.
738
+ supposed to be compatible to TextMate's URL scheme as documented at:
739
+ https ://macromates.com/blog/ 2007/the-textmate-url-scheme/
738
740
739
741
Currently, this means that the format is >
740
742
mvim://open?<arguments>
@@ -753,7 +755,7 @@ characters to be encoded twice. For example, a space should be encoded into
753
755
"%2520" instead of "%20". A file "/tmp/file name?.txt" would need the
754
756
following link: >
755
757
mvim://open?url=file:///tmp/file%2520name%253F.txt
756
-
758
+ <
757
759
MacVim will try to be smart and detect cases where a user has erroneously only
758
760
encoded once, but for best results use double-encoding as described above.
759
761
@@ -777,7 +779,7 @@ Cmd-. Interrupt Vim. Unlike Ctrl-C which is sent as normal
777
779
778
780
*Cmd-`* *<D-`>*
779
781
Cmd-` Cycle to the next window. On an American keyboard the
780
- `- key is located under the Esc-key. On European
782
+ key "`" is located under the Esc-key. On European
781
783
keyboards this key is often adjacent to the left
782
784
Shift-key and it may be not even be marked with "`".
783
785
This Cmd-key combination can only be unmapped via the
@@ -872,12 +874,12 @@ to the previous/next tab in normal mode: >
872
874
873
875
nmap <SwipeLeft> gT
874
876
nmap <SwipeRight> gt
875
-
877
+ <
876
878
As another example, here is how to switch buffers by swiping left/right: >
877
879
878
880
nmap <SwipeLeft> :bN<CR>
879
881
nmap <SwipeRight> :bn<CR>
880
-
882
+ <
881
883
See the section on | key-mapping | for more help on how to map keys.
882
884
883
885
==============================================================================
@@ -929,16 +931,16 @@ prominent bugs/missing features.
929
931
then opened in Preview where it may be printed. See | hardcopy | .
930
932
931
933
General bugs and issues are tracked on Github. If you find new bugs or have
932
- feature requests then please file an issue there: >
934
+ feature requests then please file an issue there:
933
935
https://github.com/macvim-dev/macvim/issues
934
936
935
937
For general discussions, asking questions, you could use the Github
936
- discussions page: >
938
+ discussions page:
937
939
https://github.com/macvim-dev/macvim/discussions
938
940
939
941
There is also a vim_mac mailing list. You can also post your findings of bugs
940
- and issues there as well: *vim_mac_group* >
941
- http ://groups.google.com/group/vim_mac
942
+ and issues there as well: *vim_mac_group*
943
+ https ://groups.google.com/group/vim_mac
942
944
943
945
==============================================================================
944
946
17. Hints *macvim-hints*
@@ -1017,7 +1019,7 @@ If you have not installed the "mvim" script in your path you can provide the
1017
1019
path to the Vim binary instead. Thus, if "MacVim.app" resides in the
1018
1020
Applications folder then you would use the following line: >
1019
1021
export EDITOR='/Applications/MacVim.app/Contents/MacOS/Vim -g -f'
1020
-
1022
+ <
1021
1023
Scenario: ~
1022
1024
You have set MacVim to open from an external program and when you finish
1023
1025
editing (by closing the MacVim window) you want the external program to regain
0 commit comments