Keybinding for "move up" / "move down" in outline mode?


#1

Feeling like I should be able to get this to work, but so far no luck…

How can I create a keybinding in FoldingText for Atom so that in outline mode, ‘j’ moves down and ‘k’ moves up? When I say “outline mode” I mean the mode where the whole line is selected and tags can be edited, etc. I can’t seem to find the available options for FoldingText-specific keybindings; I tried “core:move-up” but this didn’t work in outline mode.

I’m trying to make “outline mode” feel more like vi command mode. Would like to move up with j, down with k, collapse with h, expand with l. Is there a list of “outlineMode” commands available in keybindings?

Thanks for the awesome tools - been using the software for years, in one form or another! Seriously, I think you’re the only person making productivity software who “gets it.” :slight_smile:


#2

Hi! I think if you add this to your keymap you’ll get the behavior that you want:

'ft-outline-editor.outline-mode':
  'j': 'core:move-down'
  'k': 'core:move-up'

#3

Great, thanks Jesse - that worked perfectly. For anyone who’s interested, here’s what I’ve added to my keymap.cson file to add a bit of a vi flavor to outline mode:

‘ft-outline-editor.outline-mode’:
‘j’: ‘core:move-down’
‘k’: ‘core:move-up’
‘h’: ‘editor:fold-current-row’
‘l’: ‘editor:unfold-current-row’
‘d d’: ‘editor:delete-line’