Hi, I just created a prototype for a very simple package that implements a kind of binary search for cursor placement.
It works by allowing the user to choose a direction of cursor movements and moving the cursor in that direction as a binary search would do. The idea is that the user focuses on a spot where to place the cursor and then bin search to that spot issuing left/right commands.
You can try it for yourself by searching the package database for binsearch-positioning.
Since I am new to Atom development I am sure that the code can be much improved, any help/suggestion will be appreciated.
In particular I would like to know what you think about the idea and if you have any suggestions about the key binding to be associated with the left/right commands. Currently I am using
ctrl->, but I would prefer
ctrl-right. Unfortunately I don’t think this choice would play nice on all platforms, am I right?
If you do think that
ctrl-right are better choices, I cannot make atom to use that key bindings (probably to prevent the above mentioned problems on other platforms), do you have any idea about how to force that choice?
Update: I’ve changed the keybinding to
ctrl-alt-right. Hope this improves the experience.
Another area where I know I need help is in testing the package. I have no idea how to best organise the tests given that the package depends on keyboard events (in particular on the “keyup” event to work properly). More in general I am not familiar with UI testing in Atom.
Thanks in advance to everybody.