Skip to content

Commit

Permalink
Merge pull request #1307 from ychin/docs-add-reference-to-os-appearance
Browse files Browse the repository at this point in the history
Add clearer documentation about how to query the system appearance mode
  • Loading branch information
ychin committed Oct 8, 2022
2 parents 2fbd8bf + 52dcad2 commit 29f0530
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions runtime/doc/autocmd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,7 @@ OptionSet After setting an option. The pattern is
OSAppearanceChanged After changing the variable |v:os_appearance|.
This change happens only if the OS changes
its appearance and Vim is running with a GUI.
{only in MacVim GUI}

*QuickFixCmdPre*
QuickFixCmdPre Before a quickfix command is run (|:make|,
Expand Down
13 changes: 12 additions & 1 deletion runtime/doc/gui_mac.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ These are the non-standard commands that MacVim supports:
These are the non-standard events that MacVim supports:
|OSAppearanceChanged|

*macvim-internal-variables*
These are the non-standard internal variables that MacVim supports:
|v:os_appearance|

*macvim-find*
Whenever you search for something in Vim (e.g. using "/"), or hit <D-e> when
you have text selected, the search query is copied to the macOS "Find
Expand Down Expand Up @@ -319,7 +323,7 @@ this behaviour set MMLoginShellArgument to "--".
==============================================================================
4. MacVim appearance *macvim-appearance*

MacVim can be used in full screen mode, see 'fullscreen'.
For more configuration options, see the Preferences… → Appearance pane.

*macvim-appearance-mode* *macvim-dark-mode*
MacVim will by default use the system apperance mode (light or dark). However,
Expand All @@ -330,7 +334,14 @@ color scheme while system preferences are configured to use light mode. It's
also the recommended setting when title bar is configured to be "Transparent"
(see |MMTitlebarAppearsTransparent|).

If you would like to query the system apperance mode in Vim (e.g. to change
the color scheme at launch), see |v:os_appearance|. You can also use the
autocommand |OSAppearanceChanged| to be notified when the OS changes its
appearance.

*macvim-full-screen*
MacVim can be used in full screen mode, see 'fullscreen'.

There are two types of full screen modes. By default, MacVim uses macOS'
native full screen functionality, which creates a separate space in Mission
Control. MacVim also provides a non-native full screen mode, which can be set
Expand Down
1 change: 1 addition & 0 deletions runtime/doc/tags
Original file line number Diff line number Diff line change
Expand Up @@ -8389,6 +8389,7 @@ macvim-full-screen gui_mac.txt /*macvim-full-screen*
macvim-gestures gui_mac.txt /*macvim-gestures*
macvim-help-menu gui_mac.txt /*macvim-help-menu*
macvim-hints gui_mac.txt /*macvim-hints*
macvim-internal-variables gui_mac.txt /*macvim-internal-variables*
macvim-international gui_mac.txt /*macvim-international*
macvim-login-shell gui_mac.txt /*macvim-login-shell*
macvim-menus gui_mac.txt /*macvim-menus*
Expand Down

0 comments on commit 29f0530

Please sign in to comment.