Vim like ctrl-j ctrl-k to move through the list of matches in file finder,command palette


I like and actively use vim features in atom and i would be glad to find an opportunity to movement through the list of matches by ctrl-j ctrl-k instesad of arrow-down, arrow-up (file finder,command palette)
But i can’t found how to do it with key maps

somebody knows best way how to do it


I’m pretty sure you can just map the keys you’re describing to core:move-up and core:move-down. See the README for the autocomplete-plus package for an example of how to do it. You’ll need to change it to affect the fuzzy-finder box instead of autocomplete-plus … but the concept is the same.


Thanks for the quick replay :smile:
The most interesting thing is that the default keymap.cson contains the following example:

# 'atom-workspace':
#   'ctrl-shift-p': 'core:move-up'
#   'ctrl-p': 'core:move-down'

so finally i write the:

  'ctrl-k': 'core:move-up'
  'ctrl-j': 'core:move-down'

and got the vim style movement in all popup lists: file finder(ctrl-p) and command palettectrl-shift-p


my above keymaps has wide effect because of common selector “atom-workspace” so after quick study i modify my config to

'.command-palette atom-text-editor,
.fuzzy-finder atom-text-editor':
  'ctrl-k': 'core:move-up'
  'ctrl-j': 'core:move-down'
  'ctrl-h': 'core:move-left'
  'ctrl-l': 'core:move-right'

Using above approach i caught a problem with ctrl-k: move up action performs very slow
but if i set another keys ctrl-i all works fine

I guess it happens because atom waits for next keyboard action due to many default bindings like ctrl-k ctrl-1 ctrl-k down etc…

i need method to unset them all in context of my selectors(but i not found how :worried: )
so while i use workaround ctrl-i instead of original keys


You could use alt instead of ctrl to avoid the ctrl-k delay.


I’ve had mine set up the way, I love it. I got used to it from Spacemacs

The problem now is that I keep trying to ctrl-j / ctrl-k in other apps like Chrome or the Finder :wink: