This merges the upstream socket client server code. For now it is
disabled to prevent it from interferring with MacVim's own client server
implementation.
Problem: MS-Windows: Makefiles can be refactored
Solution: Refactor using a common tools.mak, make some style changes
(RestorerZ).
closes: #18060
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
In #14674, the Brazilian and Portuguese localization files were
erroneously combined, even though those are separate locales. This
reverts that change, but maintains some of the original typo fixes in
it.
closes: #15557
related: #14674
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
by removing the non-portable GNU variable and using $? instead
Note: this only works for rules with single dependencies.
closes: #15503
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
* Revise runtime/lang/Makefile
* Use predefined variables (`$@`, `$<`) instead of the actual file names.
(Adding new rules should become easier.)
* Adjust spacing.
* Regenerate converted menu files
Signed-off-by: Christian Brabandt <cb@256bit.org>
Now support a `-IgnoreUserDefaults 1` flag that can be passed to MacVim
at launch, which would cause MacVim to open with the default settings
instead of whatever the user has previously set. This only works by
overriding the MacVim-specific application defaults, and won't affect
Sparkle settings and other macOS native ones.
Also add a new menu item / macaction to open a new Vim window in clean
mode (which would prevent loading in vimrc and plugins). It works by
launching Vim using a `--clean` flag. The alt menu would open a clean
Vim window without using defaults.vim as well for the most vanilla Vim.
Currently only added Chinese/Japanese translations for the menu items.
Users who want other languages to be localized will need to file a pull
request themselves.
This feature is useful for users, but the main reason is to serve as a
pre-requisite for adding XCTest test cases to MacVim and needing a way
to launch it in a clean and predictable way.
Previous PR (#12993) fixed localization files to point to "Open &Tab..."
but they didn't add the shortcut key to the translated names. This adds
the shortcut keys to the CJK translations in the form of "(&T)".
Note that this doesn't add the shortcut to latin script languages like
Czech. These types of translated names tend to also localize the
shortcut keys for them to make sense to the user and it's up to each
translator to decide how to do so. CJK translations tend to just take
the English key directly since it doesn't make sense to have a localized
shortcut key in general.
Signed-off-by: Christian Brabandt <cb@256bit.org>
THe menu item "Open Tab..." was changed to "Open &Tab..." in #12895 but
localization files were not updated. Update it here.
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Russian menu translation can be improved
Solution: update the Russian menu files
closes: #12903
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: RestorerZ <restorer@mail2k.ru>
Currently when a user uses Sparkle updater to update, they will see the
release notes beforehand. However, if they are updating across multiple
versions, they only see the latest one. Also, if they are using
automatic update, they will not see the release notes page. Users who
get MacVim from Homebrew or manually building from source also do not
see the release notes as those mechanisms are driven from command line.
This makes it harder to communicate new features and announcements to
these users.
Add a new "What's New" page that will be automatically shown whenever
the user has updated to a new version of MacVim. The last version of
MacVIm is tracked by the MMLastUsedBundleVersion value previously added
in #1357, which allows us to detect such update no matter what
installation method was used and display a dialog box. Other than
opening at launch, the user can also open it in the Help menu, and
there's an option to make it not open at launch if it's annoying to
the user.
The release notes is served by http://macvim.org/ (done in
https://github.com/macvim-dev/macvim-dev.github.io/pull/1) so we don't
have to bundle it locally and it makes it easier to update them. MacVim
will know the request a range of release notes (if updating across
multiple versions at once) so that all new versions will be visible.
Also, fix it so that both Sparkle updater and the new What's New page
will properly be shown on top of the new MacVim window that gets opened
when MacVim is launched. Previously when we get a new update, Sparkle
frequently gets hid behind the editor window.
Add a new Vim script function `showdefinition()` that allows Vim script
to call back to macOS's data lookup feature and show the definition /
URL preview / etc for any text, at a designated row/col position. If the
row/col are not provided this function will just show it at the cursor.
Also, add a new autoload/macvim.vim for utility functions to call
showdefinition() for selected texts and the word under cursor. Make a
new right-click popup menu "Look Up" call that when there are selected
texts in visual mode to make the lookup functionality easier to access
for users without a trackpad (since Ctrl-Cmd-D is a little obscure and
unwieldy to use). For the utility functions, it was a little hard to
determine how to get the text under visual selection without yanking (we
don't want to pollute the register here), and just implemented a
function to take care of all the edge cases including visual/block/line
modes and selection=exclusive. It could be useful in other situations.
As a side refactor, change the message handler in MacVim from if/else to
switch case. In optimized builds, they both essentially optimize to the
same thing, but for debug builds, the if/else statements have to step
through one by one, and switch case just makes more sense for a giant
message ID lookup like this.
Part of Epic #1311
Apple's Korean translations contain individual "." instead of using
ellipsis, and the extraction script wasn't escapting them when using
them in `menutrans` commands. Add the escape and re-generate the Korean
menu translations.
Fix#1278