Jump to content
johnku

Vim Navigation Binding

Recommended Posts

I've got that working with Keyboard Maestro :) For the impatient (who also use KM), here's how it's done:

 

1. Create a new Macro group and choose "Alfred 2" from "Available in the following applications". 

2. Create a new macro called "Go up"

3. Choose the trigger ^k (ctrl + k) and change from "is pressed" to "is down"

4. Add a new action "Type a Keystroke" with ^p (ctrl + p)

 

 

Done. Do the analogue procedure for "Go down". You can even add a shortcut for the return key, like ^l (l corresponds to right in vim) or ^m (just like in the terminal) using a similar procedure.

 

Although that works pretty fine, a native feature is sure better.

Share this post


Link to post
Share on other sites

@snoblenet I also cannot get it working with BTT.

 

Program-specific key bindings have previously worked well for me in BTT... I wonder if there's something about keyboard input to Alfred that's different from most applications?

 

Custom scrolling keys would be a really helpful feature since macbookpro arrow keys so tiny and difficult to use. 

Share this post


Link to post
Share on other sites
On 12/25/2017 at 3:13 PM, xxyxxyxyx1 said:

I wonder if there's something about keyboard input to Alfred that's different from most applications?

 

Alfred doesn’t take focus. So Alfred-specific configurations in BTT etc. that rely on detecting the active app aren’t going to work.

 

31 minutes ago, reviolito said:

Could you please add this feature to change Ctrl + N/P to Ctrl +J/K

 

Why change? No reason you can’t have both.

Share this post


Link to post
Share on other sites

I don't understand what you mean by "No reason you can't have both". I think it would be great to give the user an option to choose which shortcuts will take him/her to the next or previous search result. Right now it's Ctrl + N for next and Ctrl + P for the previous item in the Alfred search result. I want to go to next item using Ctrl + J and previous item using Ctrl + K. There is no convenient method to achieve it using BTT or karabiner elements. So I think this should be added to the app.

Share this post


Link to post
Share on other sites
9 hours ago, reviolito said:

I don't understand what you mean by "No reason you can't have both".

 

You asked for ^N and ^P to be changed to ^J and ^K. What's wrong with having ^J and ^K in addition to ^N and ^P?

 

Share this post


Link to post
Share on other sites

I don't see any problem with having multiple key combinations for the same action. As long as I can choose which keys to use to navigate in search results I would be happy.

Share this post


Link to post
Share on other sites
16 minutes ago, reviolito said:

As long as I can choose which keys to use to navigate in search results I would be happy.

 

Ah, right. I think I misunderstood your previous comment.

 

I thought you wanted the developer to remove ^N and ^P and replace them with ^J and ^K (as @johnku originally requested), not add an option to change the key bindings.

Share this post


Link to post
Share on other sites

 

On 2/18/2019 at 1:30 AM, deanishe said:

I thought you wanted the developer to remove ^N and ^P and replace them with ^J and ^K (as @johnku originally requested), not add an option to change the key bindings.

 

 

I see! Then maybe I shouldn't have posted it here and I should make a new post for this request?

Share this post


Link to post
Share on other sites
4 hours ago, reviolito said:

I see! Then maybe I shouldn't have posted it here and I should make a new post for this request?

 

I don't think that's necessary, tbh. The new posts in this thread will have bumped it back to the top of the forum, and the Alfred team are almost certainly following the discussion, even if they haven't weighed in yet.

 

If I had to guess, I don't think an option will be forthcoming, but I'd say there's a decent chance of getting ^J and ^K added as additional keyboard shortcuts.

 

Unless Andrew is an emacs guy, of course…

Edited by deanishe

Share this post


Link to post
Share on other sites
Posted (edited)

Hey, are you planning to address this on the new version? I use the cmd+space (search - launch or focus) at least an order of magnitude more frequently then the rest of the features combined. Some flexibility/customization would make this so much better 🙂

Edited by aktupon

Share this post


Link to post
Share on other sites

If anyone wants to get similar functionality, I did this by using 2 Karabiner-Elements complex modifications. I found one that let me bind my caps lock to esc if pressed once and ctrl if pressed with other keys. Then I found another one that has left ctrl hjkl to arrow keys.

 

https://pqrs.org/osx/karabiner/complex_modifications/#caps_lock

 

^ Choose "Change caps_lock to control if pressed with other keys, to escape if pressed alone"

 

https://pqrs.org/osx/karabiner/complex_modifications/#ctrl_plus_hjkl_to_arrow_keys

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...