Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacVim defaults clean up and modernization #1277

Open
ychin opened this issue Sep 11, 2022 · 13 comments
Open

MacVim defaults clean up and modernization #1277

ychin opened this issue Sep 11, 2022 · 13 comments
Milestone

Comments

@ychin
Copy link
Member

ychin commented Sep 11, 2022

Just a general issue for improving the defaults for what I consider to be what constitutes a modern GUI text editor. Changing defaults is always contentious, and therefore should require a bit of thoughts behind them. None of the proposed defaults below change any features and they would just require either a vimrc change or changing them in the user settings. Just listing them below to keep track of and to gather feedbacks:

Update: I have made a comment for each of the new option in case people want to vote on them using emoji reactions. (Per suggested by a comment)

@ychin ychin added this to the Backlog milestone Sep 16, 2022
ychin added a commit that referenced this issue Jan 5, 2024
Updated to Vim 9.1.0

Vim 9.1 is now released! See
[announcement](https://www.vim.org/vim-9.1-released.php).

Features
====================

System monospace font (SF Mono)
--------------------

MacVim's `guifont` option now supports a new `-monospace-` value, which
instructs it to use the system monospace font, which is SF Mono in
recent macOS versions. As mentioned below, you can now use
tab-completion to see the available values in cmdline. See `:h
macvim-guifont` for more details on how to use it (including using
different font weights). #1463

Note: I'm contemplating changing the MacVim defaults to use
`-monospace-` in the future so MacVim will always use the native
monospace font instead of being hard-coded to Menlo. This makes it more
consistent with Apple Terminal and Xcode. Feel free to leave a comment
on #1277 if you have opinions on this.

New Vim features
--------------------

- Command-line tab completion improvements and bug fixes
    - Most string option values can now be completed. v9.0.1958
    - MacVim options (guifont, fuoptions) also support tab completion.
      #1436
    - ++opt (e.g. `:e ++`) and `:terminal ++` completion works as well.
      v9.0.2025
- New options:
    - `set jumpoptions=stack`. Ported from Neovim. v9.0.1921
- API changes
    - `getmousepos()` returns a new "coladd" for tab characters.
      v9.0.2032
- `:Man` now works properly when `gdefault` is set.
- A new small Vim script library that may expand in the future. See `:h
  vim-script-library`.
- Vim9 script improvements.
- Miscellaneous security fixes.

Misc
--------------------

New settings:

- "Scroll in one direction only" (Input). Prevents accidental horizontal
  scrolling when scrolling vertically using a trackpad. #1442

Clean mode (#1453):

- Vim can be opened in clean mode (does not use .vimrc or plugins) via
  the new menu item "New Clean Window". The new menu isn't localized in
  most languages. Please comment on the issue if you would like to help
  in localization.
- MacVim can be launched without loading user defaults for a clean
  experience via a command-line flag. See `:h macvim-settings`.

General
====================

- Sparkle (updater for MacVim) is now updated to 2.5.2. The updater can
  now show multiple release notes when updating MacVim across multiple
  versions. #1446 #1469
- Binary release is now built with more optimized compiler settings. Vim
  will now run slightly faster than before. #1444
- macOS 14 Sonoma:
    - Binary release is now built using the macOS 14 SDK (#1434, #1440,
      #1448). One small change is that very tall characters (e.g. "นี้")
      on the first line will now draw into the title bar instead of
      being clipped.
    - Fixed printing with `:hardcopy` under macOS 14. *NOTE:* Starting
      from macOS 14, you have to install `ps2pdf` (available from
      Ghostscript) yourself before you can print. See #1464
- Python 2 support: The default location for locating the Python 2 lib
  in the binary release is now under /Library/Frameworks rather than
  /usr/local. Note: Python 2 has long been obsolete. If you rely on
  Python 2 plugins, consider this a warning as it's only supported as
  long as it's feasible and could be removed in the future. #1434

Fixes
====================

- Fixed non-native full screen mode when using a MacBook with a notch
  and having the "Show menu bar in non-native mode" option set. Changing
  the screen resolution while using non-native full screen also works
  properly now. #1450
- Fixed Help menu's documentation search not working with tags with
  special characters like `<Down>`. #1455

Compatibility
====================

Requires macOS 10.9 or above. (10.9 - 10.12 requires downloading a
separate legacy build)

Script interfaces have compatibility with these versions:

- Lua 5.4
- Perl 5.30
- Python2 2.7
- Python3 3.9 or above
- Ruby 3.2
@nico
Copy link
Contributor

nico commented Jan 5, 2024

I'm here because the release notes asked for feedback. Maybe it makes sense to have one comment per bullet point, so that people can thumbs-up and thums-down each item?

  • No real opinion on smooth resizing (I have it on; having it on is probably a nicer default)
  • No strong opinion on k
  • No opinion on macligatures either. I don't use a font with coding ligatures, so it won't affect me. People who do use fonts with ligatures would probably prefer if those just worked, so it makes sense to me from a distance.
  • Disagree on MMShareFindPboard being NO. A shared find pasteboard across apps is a macOS thing, and integrating MacVim with that seems like a good thing to do by default
  • Depends on how good the overlay scroll bar impl is, but if it's good then that sounds good (as long as it honors the OS-wide pref for this)
  • In favor of using -monospace- by default!

@ychin
Copy link
Member Author

ychin commented Jan 5, 2024

Maybe it makes sense to have one comment per bullet point, so that people can thumbs-up and thums-down each item?

That's not a bad idea. I'll do that. I wish there's a better way to do this in GitHub.


No opinion on macligatures either. I don't use a font with coding ligatures, so it won't affect me. People who do use fonts with ligatures would probably prefer if those just worked, so it makes sense to me from a distance.

Yes that's the main reason for turning it on. The main reason it's not on right now is that the renderer is less efficient when ligatures is on, so I'll be investigating this only after hardware-accelerated renderer is implemented and see if the improved renderer can make sure to have good default and worst case performance before switching defaults over. E.g. some terminals like iTerm2 don't even support hardware accelerated ligatures.

Disagree on MMShareFindPboard being NO. A shared find pasteboard across apps is a macOS thing, and integrating MacVim with that seems like a good thing to do by default

I think my annoyance with this is that a lot of search commands I do in Vim are oddball regex that don't translate to other programs, but maybe I never really bought in to this part of the Mac philosophy (sharing find pboard everywhere). But it's good to hear a dissenting view here. I should at least expose it as a graphical user-visible setting. (FWIW Cmd-E/Cmd-G in MacVim are hard-coded to use the system shared find pasteboard no matter what, and it ignores MMShareFindPboard)

@ychin
Copy link
Member Author

ychin commented Jan 5, 2024

New default:

@ychin
Copy link
Member Author

ychin commented Jan 5, 2024

New default:

  • set guioption+=k

@ychin
Copy link
Member Author

ychin commented Jan 5, 2024

New default:

  • set macligatures

@ychin
Copy link
Member Author

ychin commented Jan 5, 2024

New default:

  • MMShareFindPboard should be NO.

@ychin
Copy link
Member Author

ychin commented Jan 5, 2024

New default:

  • Overlay scroll bar (once implemented)

@ychin
Copy link
Member Author

ychin commented Jan 5, 2024

New default:

  • set guifont=-monospace-

@brombres
Copy link

brombres commented Jan 5, 2024

New default:

  • MMShareFindPboard should be NO.
  • I downvoted.
  • I don't feel too strongly about it either way.
  • Agreed that the regex searches we often use aren't useful to other apps - but they could be in the future.
  • Unless it being on by default is a pain point for people, we should just stick to the Mac paradigm. I've been a MacVim user for ~15 years and I never noticed that behavior, so it's prolly not bothering most people.
  • I think your suggestion of leaving it on (YES) but exposing it as a GUI setting sounds great.

@bikermikem
Copy link

set guifont=-monospace-

Yes. Please.

@caseyandgina
Copy link

caseyandgina commented Jan 9, 2024

Can you please briefly explain what set guioption+=k and MMShareFindPboard would do?

Also, I downvoted ligatures because I assume that would mean that things like => would be rendered automatically as a ligature, and I think that would be jarring to me and others editing code as I've never experienced that behavior in the editors that I've used over the years (granted, most of those have been terminal-based, so it's more due to lack of ligatures in terminals, but I think I would find it annoying enough to search for a way to disable it).

@ychin
Copy link
Member Author

ychin commented Jan 9, 2024

set guioption+=k

This would make the window not change size when you add a new tab, scroll bar, and toolbar. Without this setting, adding/removing those will try to resize the GUI window to preserve same number of lines, which could be jarring for the user and unlike how most other text editors work. Setting the option makes it work more like in full-screen, where it will change the number of lines to preserve the GUI window size so the window stays stable.

MMShareFindPboard

This defaults to "YES" right now. It makes it so that all the search you do (e.g. using /) will be shared to macOS's find pasteboard. Then means you can search for something in Vim, then do Cmd-G in another app (e.g. Safari) and it will just work. The primary reason I don't like this is that a lot of times Vim searches are complicated regex patterns that may not make sense in other text editors. But from other people's reactions I'm easing on that.

Also, I downvoted ligatures because I assume that would mean that things like => would be rendered automatically as a ligature, and I think that would be jarring to me and others editing code as I've never experienced that behavior in the editors that I've used over the years (granted, most of those have been terminal-based, so it's more due to lack of ligatures in terminals, but I think I would find it annoying enough to search for a way to disable it).

=> will only be turned into a ligature if your font supports it, which I would guess your font does not. I actually don't know if there's any font ligature at all in the default monospace fonts provided by Apple. Usually people have to install custom fonts like Fira Code in order to get ligatures. Ultimately your font dictates what ligatures you will get, and usually when people use a font that supports ligatures that is because they want ligatures, but maybe that's not always true.

But it's a fair point that a renderer isn't obligated to support ligatures, and the default should probably be more minimal, as people who care about ligatures can just turn it on.

@caseyandgina
Copy link

caseyandgina commented Jan 10, 2024

Thanks! Given that, I upvoted both of those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants