Skip to content

Commit 520cd8b

Browse files
authored
Merge pull request #1133 from ychin/cleanup-macvim-docs-help-menu-startup
Cleanup MacVim docs
2 parents 6d737d1 + b40a0d7 commit 520cd8b

2 files changed

Lines changed: 76 additions & 47 deletions

File tree

runtime/doc/gui_mac.txt

Lines changed: 70 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,14 @@ It is not possible to modify 'termencoding' in MacVim; this option is forcibly
5252
set to "utf-8". The option 'encoding' also defaults to "utf-8" (as opposed to
5353
"latin1" in the other GUI ports).
5454

55-
Note: UTF-8 can represent all characters defined in Unicode, which includes
56-
all characters in all other standard encodings, so it should be perfectly safe
57-
to edit files in any encoding while 'encoding' is set to "utf-8". Of course,
58-
you may need to set 'fileencodings' to auto-detect the encoding of the files
59-
you edit, or force the detection with |++enc| on the command line.
55+
In generally you should keep 'encoding' set to the default ("utf-8") as that's
56+
what macOS uses. It also works on any character. Sometimes you may need to
57+
set 'fileencodings' to auto-detect encoding of files you edit, or force the
58+
detection with |++enc| on the command line.
6059

6160
However, if you are editing files that use multiple encodings (container
62-
formats like MIME or Unix mbox files) or no standard encoding (binary data,
63-
see also |edit-binary|), you may want to prevent MacVim from re-encoding the
64-
file at all. In this situation, you will need to set both 'encoding' and
65-
'fileencodings' to a simple single-byte encoding such as Latin1 so that when
66-
the file is read into memory, the original bytes are left untouched.
61+
formats like MIME or Unix mbox files) or a binary file, you want to make sure
62+
'binary' is set (see |edit-binary|).
6763

6864
*macvim-shift-movement*
6965
Text editors on macOS lets the user hold down shift+movement key to extend the
@@ -91,12 +87,12 @@ The "Open files from applications" preference in the General preference pane
9187
gives more options on how dropped files should open, in case tabs are not
9288
desired.
9389

94-
*macvim-default-menu*
95-
The default menu in MacVim has been changed to conform better with the Apple
96-
Human Interface Guidelines (HIG).
90+
*macvim-default-menus* *macvim-help-menu*
91+
The default menus (|menu.vim|) in MacVim have been changed to conform better
92+
with the Apple Human Interface Guidelines (HIG).
9793

98-
Note: The menus are a work in progress. If you know something about the HIG
99-
and want to contribute to MacVim you could do so by making the menus better.
94+
The Help menu's search can be used to search Vim's documentation. You can use
95+
it to quickly find the documentation you want in addition to using |:help|.
10096

10197
*macvim-window-title*
10298
The default window title does not include the argument list because it looks
@@ -156,11 +152,11 @@ behaviour, then add the line "set backspace&" to your "~/.vimrc" file.
156152
==============================================================================
157153
2. Starting MacVim *macvim-start*
158154

159-
The easiest way to start MacVim is by double-clicking its icon in the Finder,
160-
but most users will probably prefer to use the Terminal. First some Finder
161-
related ways of starting MacVim are described, then Terminal is discussed.
162-
Note that you can put MacVim anywhere on your hard drive, but in this help
163-
file it is assumed that you have put it inside your /Applications folder.
155+
Starting MacVim from the UI ~
156+
157+
To start MacVim in macOS, simply double-click its icon in the Finder or click
158+
on the Dock icon. Usually it should be installed as
159+
`/Applications/MacVim.app`.
164160

165161
MacVim automatically registers itself as an editor of several standard file
166162
formats. This enables you to double-click a file to open it with MacVim (if
@@ -172,41 +168,51 @@ have files open in e.g. splits by changing the "Open files from applications"
172168
option in the General preference pane). Finally, you can use macOS System
173169
Services to open files in MacVim, see |macvim-services|.
174170

175-
Use |mvim| script to start MacVim from Terminal.
176-
177-
Or use the "open" command (this method can not be used to pass parameters to
178-
Vim) >
171+
Alternatively, use the "open" command (this method can not be used to pass
172+
parameters to Vim) >
179173
open -a MacVim file ...
180174
The advantage of using the latter method is that the settings relating to file
181175
opening in the preferences panel are respected, and files open instantly if
182176
|Quickstart| is enabled.
183177

184-
Once in terminal Vim it is possible to start MacVim by using the following
185-
command:
186-
:gui [++opt] [+cmd] [-f|-b] [files...]
187-
Note: Forking ("-b") currently does not work.
178+
Starting MacVim from a terminal~
188179

189-
*mvim*
190-
The "mvim" shell script bundled with MacVim. >
180+
*mvim* *macvim-PATH* *macvim-cmdline*
181+
MacVim comes bundled with a shell script called "mvim" that can be used to
182+
launch MacVim from the terminal. It's located at: >
191183
/Applications/MacVim.app/Contents/bin/mvim
192-
This is a wrapper script to launch Vim executable in the bundle. Put this
193-
folder >
184+
185+
To be able to easily use it, put this folder in your path: >
194186
/Applications/MacVim.app/Contents/bin
195-
in your path and then simply type "mvim" to start MacVim from Terminal. >
187+
For example, if you use zsh, you can put the following in `~/.zprofile`: >
188+
export PATH="/Applications/MacVim.app/Contents/bin:$PATH"
189+
190+
After that, type "mvim" to start MacVim from Terminal. >
196191
$ mvim
197192
You can also specify files to open with. >
198193
$ mvim file ...
199194
Also the bin folder has convenient scripts for diffing and opening file as the file is read-only. >
200195
* Diff: mvimdiff
201196
* Read-only: mview
202197
203-
You can use "vim", "vimdiff", and "view" if you want to use non-GUI Vim.
198+
You can still use the normal "vim", "vimdiff", and "view" commands if you want
199+
to use non-GUI Vim, and "gvim" to launch MacVim ("gvim" works the same way as
200+
"mvim").
201+
202+
Going from terminal to GUI mode~
203+
204+
Once in terminal Vim it is possible to start the MacVim GUI by using the
205+
following command (see |:gui|):
206+
:gui [++opt] [+cmd] [-f|-b] [files...]
207+
Note: Forking ("-b") currently does not work.
204208

205209
*Quickstart*
206-
Quickstart ensures that new windows open instantaneously e.g. when <D-n> is
207-
pressed. This feature can be enabled from the Advanced preferences pane (it
208-
is disabled by default). Note that this setting does not affect the speed
209-
with which windows open when using the |mvim| command.
210+
Quickstart ensures that new windows open quickly e.g. when <D-n> is
211+
pressed. It works by keeping a Vim process in the background that will
212+
immediately become active when you open a window. This feature can be enabled
213+
from the Advanced preferences pane (it is disabled by default). Note that
214+
this setting does not affect the speed with which windows open when using the
215+
|mvim| command.
210216

211217
Note that any changes to runtime files that are kept in a non-standard
212218
location (i.e. not in ~/.vim) will not be picked up for the first window that
@@ -256,6 +262,7 @@ KEY VALUE ~
256262
*MMFullScreenFadeTime* fade delay for non-native fullscreen [float]
257263
*MMLoginShellArgument* login shell parameter [string]
258264
*MMLoginShellCommand* which shell to use to launch Vim [string]
265+
*MMNativeFullScreen* use native full screen mode [bool]
259266
*MMNoFontSubstitution* disable automatic font substitution [bool]
260267
(Deprecated: Non-CoreText renderer only)
261268
*MMNoTitleBarWindow* hide title bar [bool]
@@ -314,6 +321,13 @@ color scheme while system preferences are configured to use light mode. It's
314321
also the recommended setting when title bar is configured to be "Transparent"
315322
(see |MMTitlebarAppearsTransparent|).
316323

324+
*macvim-full-screen*
325+
There are two types of full screen modes. By default, MacVim uses macOS'
326+
native full screen functionality, which creates a separate space in Mission
327+
Control. MacVim also provides a non-native full screen mode, which can be set
328+
by disabling native full screen in the preference panel, or by setting
329+
|MMNativeFullScreen| to `NO` manually.
330+
317331
==============================================================================
318332
5. Special colors *macvim-colors*
319333

@@ -367,6 +381,12 @@ highlight color when a window becomes inactive.
367381
==============================================================================
368382
6. Menus *macvim-menus*
369383

384+
Default Menus~
385+
386+
See |macvim-default-menus|.
387+
388+
Customization~
389+
370390
Menus in macOS behave slightly different from other platforms. For that
371391
reason two new commands have been added to Vim. To understand what these
372392
commands do you must first understand how menus work on macOS.
@@ -537,10 +557,13 @@ that items after it will be right-aligned, and is specified by names that
537557
begin with "-flexspace" and ends with "-".
538558

539559
*macvim-touchbar-icon*
540-
You can specify icons for Touch Bar buttons the same way for toolbar icons.
541-
Touch Bar icons should ideally be 36x36 pixels, and no larger than 44x44
542-
pixels. You can also use default template icons provided by Apple by using
543-
their template names. An example: >
560+
You can specify icons for Touch Bar buttons the same way for toolbar icons
561+
(see |macvim-toolbar|). When a button has an icon, it won't show the menu
562+
name. Touch Bar icons should ideally be 36x36 pixels, and no larger than
563+
44x44 pixels. >
564+
:an icon=/home/foo/bar.png TouchBar.DoSomething :echo 'Do'<CR>
565+
You can also use default template icons provided by Apple by using their
566+
template names. An example: >
544567
:an icon=NSTouchBarListViewTemplate TouchBar.ShowList :ls<CR>
545568
<
546569
*macvim-touchbar-title*
@@ -806,17 +829,18 @@ prominent bugs/missing features.
806829
- Printing. As a temporary solution <D-p> creates a PostScript file which is
807830
then opened in Preview where it may be printed. See |hardcopy|.
808831

809-
Other bugs and issues are tracked on Github. If you find new bugs or have
832+
General bugs and issues are tracked on Github. If you find new bugs or have
810833
feature requests then please file an issue there: >
811834
https://github.com/macvim-dev/macvim/issues
812835
836+
For general discussions, asking questions, you could use the Github
837+
discussions page: >
838+
https://github.com/macvim-dev/macvim/discussions
839+
813840
There is also a vim_mac mailing list. You can also post your findings of bugs
814841
and issues there as well: *vim_mac_group* >
815842
http://groups.google.com/group/vim_mac
816843
817-
This is also the best place for making feature requests as well as for asking
818-
general questions about MacVim.
819-
820844
==============================================================================
821845
16. Hints *macvim-hints*
822846

runtime/doc/tags

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5018,6 +5018,7 @@ MMDisableLaunchAnimation gui_mac.txt /*MMDisableLaunchAnimation*
50185018
MMFullScreenFadeTime gui_mac.txt /*MMFullScreenFadeTime*
50195019
MMLoginShellArgument gui_mac.txt /*MMLoginShellArgument*
50205020
MMLoginShellCommand gui_mac.txt /*MMLoginShellCommand*
5021+
MMNativeFullScreen gui_mac.txt /*MMNativeFullScreen*
50215022
MMNoFontSubstitution gui_mac.txt /*MMNoFontSubstitution*
50225023
MMNoTitleBarWindow gui_mac.txt /*MMNoTitleBarWindow*
50235024
MMShareFindPboard gui_mac.txt /*MMShareFindPboard*
@@ -7788,23 +7789,27 @@ mac-vimfile os_mac.txt /*mac-vimfile*
77887789
macintosh os_mac.txt /*macintosh*
77897790
macro map.txt /*macro*
77907791
macvim gui_mac.txt /*macvim*
7792+
macvim-PATH gui_mac.txt /*macvim-PATH*
77917793
macvim-appearance gui_mac.txt /*macvim-appearance*
77927794
macvim-appearance-mode gui_mac.txt /*macvim-appearance-mode*
77937795
macvim-autocommands gui_mac.txt /*macvim-autocommands*
77947796
macvim-backspace gui_mac.txt /*macvim-backspace*
77957797
macvim-clientserver remote.txt /*macvim-clientserver*
7798+
macvim-cmdline gui_mac.txt /*macvim-cmdline*
77967799
macvim-colors gui_mac.txt /*macvim-colors*
77977800
macvim-colorscheme gui_mac.txt /*macvim-colorscheme*
77987801
macvim-commands gui_mac.txt /*macvim-commands*
77997802
macvim-dark-mode gui_mac.txt /*macvim-dark-mode*
7800-
macvim-default-menu gui_mac.txt /*macvim-default-menu*
7803+
macvim-default-menus gui_mac.txt /*macvim-default-menus*
78017804
macvim-delete gui_mac.txt /*macvim-delete*
78027805
macvim-dialogs gui_mac.txt /*macvim-dialogs*
78037806
macvim-differences gui_mac.txt /*macvim-differences*
78047807
macvim-drag-n-drop gui_mac.txt /*macvim-drag-n-drop*
78057808
macvim-encoding gui_mac.txt /*macvim-encoding*
78067809
macvim-find gui_mac.txt /*macvim-find*
7810+
macvim-full-screen gui_mac.txt /*macvim-full-screen*
78077811
macvim-gestures gui_mac.txt /*macvim-gestures*
7812+
macvim-help-menu gui_mac.txt /*macvim-help-menu*
78087813
macvim-hints gui_mac.txt /*macvim-hints*
78097814
macvim-international gui_mac.txt /*macvim-international*
78107815
macvim-login-shell gui_mac.txt /*macvim-login-shell*

0 commit comments

Comments
 (0)