News for hackers. Stuff that matters.
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by dexterleng on Sunday August 30, 2020 @11:10AM (#24323394)
Hello all! I am a student from Singapore who was introduced to Vimium by a friend two years ago. Vimac is my attempt to implement Vimium on an OS level.

I have shared this app on Reddit about a year ago. Since then, the notable changes would be a major performance buff in webkit/electron, force keyboard layout, and reducing the overwhelming no. of hints to what is just "clickable".

It is open source at https://github.com/dexterleng/vimac/.

Do let me know if you have any questions!

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by _chendo_ on Sunday August 30, 2020 @11:01PM (#24328139)
Hello!

Glad to see more people making tools around the Accessibility API. I've been working on a similar app called Shortcat (https://shortcatapp.com) almost 8 years ago (wow) but haven't had the time to properly work on it. It sounds like you're encountering a lot of the same problems I've had when I was starting out (figuring what's actionable, forcing keyboard layout etc). Let me know if you want to chat about the various problems in that space

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by IggleSniggle on Monday August 31, 2020 @01:15AM (#24328695)
Hey, it’s you! The author of Shortcat. I tried out your project maybe a year ago and absolutely loved the concept, but eventually had to give up on it when it kept crashing and didn’t reliably find what I was attempting to click on. I never knew if Shortcat was to blame or if it was the application not being properly presented to the Accessibility system.

Anyway, Shortcat is a freakin brilliant idea and I hope you keep working on it, or help this author with their project. If you think you’re going to have time to work on Shortcat again, though, I’d happily buy a copy (even if I already did before, I can’t remember if I did) and be an active bug reporter.

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by _chendo_ on Monday August 31, 2020 @10:18PM (#24337914)
Glad you loved the concept!

Unfortunately I've been rather busy the last couple of years and haven't had the capacity to work on Shortcat, and coupled with not being amazing at Obj-C/Swift/Cocoa (my major contributions are FuzzyAutocomplete and the initial POC for Semantic History in iTerm2), being frustrated with building UIs on Mac (mostly build web stuff). There's also the problem that Accessibility APIs aren't well-documented and isn't commonly used, and applications not implementing Accessibility correctly (and potentially causing crashes in Shortcat, or making the target application hang), which was super tough to deal with as a solo dev.

I did have a crack at bringing the Swift-based prototype up to date with Swift 5 on the weekend, and am investigating the feasibility of using SwiftUI which would help me on the UI front! Ideally I'd find another dev to work on Shortcat (rev-share or otherwise), and consider a more sustainable pricing model.

I think tools that depend on Accessibility APIs that are used by people who don't normally depend on Accessibility APIs can force developers to improve their AX implementation so people who do depend on good Accessibility to use applications can benefit.

It makes me happy to hear that it was good enough for you to buy another copy!

How did you discover Shortcat in the first place?

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by IggleSniggle on Tuesday September 01, 2020 @12:28AM (#24338559)
I wish I could remember how I came across Shortcat. It may have actually been simply that your product description matched what I was seeking so perfectly that it turned up on a Google search...or perhaps it was through some second-hand recommendation coming indirectly from a Google search like this one: https://gist.github.com/lornajane/3892c39098cf70baa9c7a1874c...

But the main thing is that Shortcat was simply the thing that I always thought should have been baked into operating systems since the idea of “search to execute” became a thing. Mostly these days I rely on Command-Shift-/ (Menubar search), but that is a poor poor substitute. Shortcat really shines in dynamic context selection, like when trying to navigate something like Outlook for Mac, where you don’t know the shortcuts and don’t care to use them, and anyway just want to select the email that contains the text you’ve already started reading. Or things like the preference menus where navigating the combination of tabs and sidebars can be especially unclear from a keyboard perspective.

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by ajavascriptdude on Sunday August 30, 2020 @09:43PM (#24327707)
Thank you for not using electron
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by nikivi on Sunday August 30, 2020 @12:18PM (#24323796)
One issue I had with running this aside from it taking quite a lot of CPU is that when opening Discord, I'd always get a warning that I am using a screen reader.

Was it solved in new versions?

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by dexterleng on Sunday August 30, 2020 @12:28PM (#24323860)
> it taking quite a lot of CPU

Yes that is fixed.

The reason for slow performance + high cpu usage on electron/webkit apps was just the sheer amount of mach ipc calls (from the many many <div> layers) needed to be made to fetch the entire UI element tree.

This has been fixed two days ago Heres the solution for those interested: https://github.com/dexterleng/vimac/pull/190

I was also using a bunch of async queues instead of just a single NSThread which likely contributed to high cpu usage, and that has also been fixed.

> warning that I am using a screen reader.

Nope, you should get this warning, although it was a one time prompt for me. This is because Accessibility is opt-in for electron apps for performance reasons, and I have to ask for it through setting the AXManualAccessibility attribute (see https://electronjs.org/docs/tutorial/accessibility#assistive...), which I guess triggers the prompt.

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by fny on Sunday August 30, 2020 @12:43PM (#24323966)
Why did you choose to use electron for something so specific to MacOS?

Awesome project by the way. This will save my wrists from a lot of pain.

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by dexterleng on Sunday August 30, 2020 @12:48PM (#24323999)
The app is written in Swift, not Electron.

Vimac had major performance issues previously when traversing the UI Element tree of Electron/Webkit apps.

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by hibiscus4156 on Sunday August 30, 2020 @12:47PM (#24323995)
> Why did you choose to use electron for something so specific to MacOS?

I think you're mistaken. OP is referring to Discord as the webkit/electron app.

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by messe on Sunday August 30, 2020 @12:48PM (#24323998)
I don’t think they did. They’re just talking about the high cpu usage when trying to navigate an electron app while using vimac.
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by johne20 on Sunday August 30, 2020 @02:20PM (#24324742)
Great work! I am just trying it out, but realized it doesn't highlight links/buttons in Firefox. Is that outside the scope of this tool? If so, do you just suggest using Vimac in combination with Vimium?
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by dexterleng on Sunday August 30, 2020 @02:34PM (#24324839)
It actually technically could support Firefox/chrome, but I have disabled it because enabling accessibility on chrome breaks window managers.

Also vimium will always be faster than vimac due to how slow the accessibility API is.

I would recommend using both for now.

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by mkskm on Sunday August 30, 2020 @04:28PM (#24325672)
One missing piece worth noting is Vimium doesn't seem to support navigating preferences, bookmarks, etc. in Firefox or anything in the toolbar. Not sure if that is possible solely with the WebExtensions API.
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by anoviceuser on Monday August 31, 2020 @03:20AM (#24329184)
Great work @dexterlang. Thanks for building it. I am already actively using it and really like it.
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by pazimzadeh on Sunday August 30, 2020 @01:47PM (#24324484)
I don't know vim. If I get used to this, will I be halfway to knowing vim?
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by jagged-chisel on Sunday August 30, 2020 @01:57PM (#24324560)
Nope. This is really just making your GUI work better with the keyboard. Editing text is fundamentally different than manipulating a graphical interface, so this doesn't mimic any vim functionality (with one exception: when this app is in scroll mode, you can use HJKL keys to scroll windows contents.)
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by dexterleng on Sunday August 30, 2020 @01:59PM (#24324575)
It's very much like Vimium, which is nothing like Vim, so no. I see Vimium being referred to as "vim bindings" for chrome which I never got. Maybe someone could enlighten me on this.
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by cuchoi on Sunday August 30, 2020 @10:43PM (#24328054)
There are some bindings that are the same as vim (gg, G, /, i, v, etc.). But overall I wouldn't say it helps you learn vim.
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by nchudleigh on Sunday August 30, 2020 @03:24PM (#24325211)
well i mean vimium implements a lot of similar bindings from com.

navigation visual selection find scroll

Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by konart on Monday August 31, 2020 @03:12AM (#24329154)
You will be some part of the way to knowing navigation in vim.
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by victoriasun on Sunday August 30, 2020 @02:03PM (#24324605)
I love this! As a colemak-dh user, is there a way to easily re-kebind hjkl?
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by dexterleng on Sunday August 30, 2020 @02:09PM (#24324649)
Yes, you can do so!
Re:Show HN: Vimac – Productive macOS keyboard-driven navigation by atsaloli on Sunday August 30, 2020 @12:37PM (#24323929)
Thank you!! Can’t wait to try this out.