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

Support App Intents and app shortcuts #1322

Open
ychin opened this issue Oct 25, 2022 · 1 comment
Open

Support App Intents and app shortcuts #1322

ychin opened this issue Oct 25, 2022 · 1 comment
Labels
13.0 Ventura Feature Request New features request. Not an existing issue or bug. System Integration Integration with OS services and other apps
Milestone

Comments

@ychin
Copy link
Member

ychin commented Oct 25, 2022

macOS 13 Ventura added a new API called App Intents (https://developer.apple.com/documentation/appintents). MacVim should support that to allow for integration into other apps and automation.

TODO: Think about what kind of intents to expose. We already exposes 2 macOS "Services" (a pretty old API) today: one for opening MacVim in a specific folder, and another for opening MacVim from a particular selected text. We can add those two to App Intents as well.

Other than those two, some ideas for feature set:

  • create/open files
  • query/filter opened files, properties, plugins, and more.
  • process files with Vim script
  • run generic Vim script

A lot of the above can already be done with Vim's +clientserver and using mvim -c in a ZSH script. Adding dedicated shortcuts does seem nicer as it would provide an easier and more structured interfaces for stringing together commands in Shortcuts.app. But we should make sure that whatever we add does provide genuine value to the user.

In addition to app intents (which could be used to compose shortcuts), we should provide default app shortcuts that can be used as is.

Also, interestingly, it doesn't seem like a lot of apps have added support for this, and exactly 0 text editors / IDEs seem to support it.

@ychin ychin added Feature Request New features request. Not an existing issue or bug. 13.0 Ventura labels Oct 25, 2022
@ychin ychin added this to the Backlog milestone Oct 25, 2022
@ychin ychin added the System Integration Integration with OS services and other apps label Oct 25, 2022
@ychin ychin changed the title Support App Intents (for Shortcuts) Support App Intents and app shortcuts Oct 25, 2022
@eirnym
Copy link
Contributor

eirnym commented Oct 26, 2022

I love this idea!

I have following questions should be answered during the implementation.

  1. Backward compatibility. My guess, that an old system just won't read these entries.
  2. What's about services? Should we keep both? My guess is we keep services for the time being
  3. Does new AppIntents registration know where exactly to look for mvim?
  4. Does old services know where exactly to look for mvim?
  5. I wouldn't rely on the PATH variable as it can be set in a script and in some cases (like when doing sudo, su and ssh) it's not a good idea to add MacVim to the PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
13.0 Ventura Feature Request New features request. Not an existing issue or bug. System Integration Integration with OS services and other apps
Projects
None yet
Development

No branches or pull requests

2 participants