andweeb / Ki

⌘ Work in macOS like you work in vim <currently under construction>
MIT License
127 stars 13 forks source link

Question regarding action mode #17

Open foolish-birdy opened 4 years ago

foolish-birdy commented 4 years ago

I'm recently using ki. I really like the mode switching as I'm a vimer. I tried the action mode. I need to switch to action mode first and key down the shortcut of an action and then the entity shortcut. It is waired that key down the action shortcut first and then the entity shortcut. For example, "I want to open Outlook and view my calendar". I'll naturally think to "switch to action mode -> select an entity -> take an action". But currently, the flow is "take an action -> select an entity/application".

andweeb commented 4 years ago

Hi @foolish-birdy, this is a really good observation!

Ki is consistent with vim in that it follows a SVO (subject-verb-object) paradigm. In normal mode in vim, ciw is "change in word", i.e. implicit subject (vim), verb (operation), then object (text). In Ki, the flow is the same in which you specify the verb first (view calendar), then the object (Outlook application).

So what you're describing is the SOV (subject-object-verb) paradigm, the inversion of verb and object. In the text editing world, Kakoune follows this paradigm, and you can see the discussion comparing Kakoune and vim's "sentence" structure here.

I actually had this same exact concern when developing Ki, debating which paradigm to follow, but opted to go for SVO. As I wanted a concept of a "default action" which would most commonly be "focus or activate", I went with SVO in order to keep actions optional, e.g. the "select an entity" step would not wait for the "take an action" step and instead simply dispatch the "default action" automatically.

Hope that makes sense! Let me know if you have any other questions. :)

FYI in v2 I'll actually be deprecating action mode, and instead have actions be specified in normal mode, which aligns even closer to how it works in vim.

foolish-birdy commented 4 years ago

Good to hear the deprecating of action mode. When v2 could be released? Looking forward to having a try.

andweeb commented 4 years ago

Hmm, it's hard to say since Ki's undergoing a pretty large refactor at the moment, but you can track the effort in the project here if you're interested (v2 should be the release of this card and this card).

The API is subject to change right now, but if you'd like to try out v2 before an official stable release anyway, you can build Ki in the develop branch manually and refer to the default config or my personal .hammerspoon config (also in the develop branch) as reference for building your own configs.

Thanks for the interest!