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

Works in Notes app but not Mail app #1

Open
sdondley opened this issue Feb 12, 2022 · 6 comments
Open

Works in Notes app but not Mail app #1

sdondley opened this issue Feb 12, 2022 · 6 comments
Labels
AX API not available The accessibility api is not implemented properly

Comments

@sdondley
Copy link

Any trick to get it working with Mail?

@FelixKratz
Copy link
Owner

Interestingly apple does not implement the required accessibility features for their mail compose window because it
is a HTML content editable field, even when selecting plain text as a format.
I believe this is an oversight on their part, as I can happily use svim in my webmail plain text client.

@FelixKratz FelixKratz added the AX API not available The accessibility api is not implemented properly label Feb 20, 2022
@daxmate
Copy link

daxmate commented Nov 25, 2022

It's so bad that there is no access to Mail compose window. I do most my writing in Mail:(

@FelixKratz
Copy link
Owner

Thats why I have moved to Mailspring. In mailspring the "rich text and advanced editor features" can be switched off, this will give a monospaced plain text view for mail composing. Since mailspring is an electron app, svim needs to be compiled with -DMANUAL_AX to work with this app.

@daxmate
Copy link

daxmate commented Dec 16, 2022

Hi, FelixKratz

Many thanks for the info about Mailspring. I would like to try it.

I don't know so much about programming, so I didn't figure out how to do it. Here is what I tried.

  1. git clone svim repository to my mac;
  2. uncommented -DMANUAL_AX in the makefile
  3. make
  4. Since svim is already installed with brew, I copied the svim binary to where brew placed it
  5. brew services restart svim

the above didn't work. and the compiled binary size is only half of brew installed binary.

Would you please help me out?

@FelixKratz
Copy link
Owner

FelixKratz commented Dec 16, 2022

Hi, FelixKratz

Many thanks for the info about Mailspring. I would like to try it.

I don't know so much about programming, so I didn't figure out how to do it. Here is what I tried.

  1. git clone svim repository to my mac;
  2. uncommented -DMANUAL_AX in the makefile
  3. make
  4. Since svim is already installed with brew, I copied the svim binary to where brew placed it
  5. brew services restart svim

the above didn't work. and the compiled binary size is only half of brew installed binary.

Would you please help me out?

You steps are perfectly fine, except one critical detail that revolves around code signature and the macOS gatekeeper:

You can create the full bundle I use for the releases by running:

make bundle

it properly signs the binary for gatekeeper if you have a certificate called 'svim-cert' here:

SketchyVim/makefile

Lines 39 to 41 in 010426a

sign:
$(MAKE) universal
codesign -fs 'svim-cert' $(ODIR)/svim

If you don't want to bother with creating this certificate you can simply swap out the signature command with an ad-hoc certificate:

codesign --force -s - $(ODIR)/svim

If you now run make bundle it should create a bundle_$(VERSION).tgz file in the folder where the full binary with proper code signature can be found. If you swap this with the homebrew binary it should work fine. You might need to focus Mailspring twice initially such that it sets the manual ax flag and then is recognized as supported.

Alternatively it should also be enough to run:

make
codesign --force -s - bin/svim

this binary only contains one instruction set, i.e. x86 or arm64 depending on the system you compile it on, thats why it is half the size of the release binary, which contains both.

@daxmate
Copy link

daxmate commented Dec 17, 2022

Many thanks for your very detailed instructions and explanation.

But after more than years working with Mail, I am afraid the pain of changing.

BTW, svim doesn't support multi-key mapping. So we can't map jk to escape insert mode. There is a workaround by using Karabinar.

2022-12-17.13.14.08.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AX API not available The accessibility api is not implemented properly
Projects
None yet
Development

No branches or pull requests

3 participants