Open sdondley opened 2 years ago
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.
It's so bad that there is no access to Mail compose window. I do most my writing in Mail:(
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.
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.
the above didn't work. and the compiled binary size is only half of brew installed binary.
Would you please help me out?
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.
- git clone svim repository to my mac;
- uncommented -DMANUAL_AX in the makefile
- make
- Since svim is already installed with brew, I copied the svim binary to where brew placed it
- 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: https://github.com/FelixKratz/SketchyVim/blob/010426a7b924a280257080e70afe6a6855037c20/makefile#L39-L41
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.
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.
Any trick to get it working with Mail?