Bullet list manipulation: add custom hotkeys for indent in/out

EDIT:
Most of this request is implemented. What is still missing is having customizable shortcuts for indenting and unindenting.


Reorganizing lots of content in an efficient way is super important to me.

Shifting Up and Down

Re-prioritizing happens all the time.
Setting a custom keyboard shortcut like Ctrl-Shift-Up and Ctrl-Shift-Down should allow moving the line I’m editing Up or Down in the document. It should work the same for multi-line selections to shift up/down as a group.

Nesting In and Out

Since the markdown paradigm generally associates nesting with bullets, setting a custom keyboard shortcut like Ctrl-Shift-Right and Ctrl-Shift-Left should manipulate single lines and highlighted groups of lines respectively in the following manner:

  • If a Shift-In is made on an un-nested line without bullets, add a bullet to line
  • If Shift-In is made on a bulleted line, nest it inward 1 position
  • If Shift-Out is made on a bulleted line, nest it outward 1 position
  • If Shift-Out is made on an un-nested bulleted line, remove the bullet

Default should be bullet (or user setting otherwise) but if a precedent is set for any line regarding bullet vs. numbered list, preserve the line’s preference and contextual awareness for numbered lists.

If non-bulleted nesting is desired, a different keyboard shortcut could be used to simply tab lines (or groups of lines) in and out regardless of whether bullets exist and without adding or removing bullets.

If implemented, this feature would likely contribute to the single greatest joy for me in my Obsidian workflow. :pray:

I just want to make a quick edit and mention that this feature should absolutely come with the option to choose your own key combination.

39 Likes

For the record, I have global shortcuts set up to do this across apps (Mac), but they don’t work in Obsidian. I believe this to be an Electron thing, but I’m not sure. So yeah, I would like this too.

1 Like

Would love this! I vote to expand what Obsidian does now (shift+tab to outward indent, tab to inward intent), you just have to manually type the bullet after you tab. So just extend the setting to put the users preferred bullet syntax (-,*,+) when you tab and we’d be smooth sailing!

The tab action is also how Roam basically works, so it’ll be fluid for those users.

3 Likes

If something like this is implemented, might also be worth considering whether it should be supported in the vim mode (e.g. what exactly does > do in what contexts).

1 Like

I really want the feature of moving lines up and down implemented, but I like how it is implemented in VS Code and Joplin which is using Alt+up/down.

However, I don’t mind the key combination used, I could get used to it or remap them when/if key remapping is implemented.

4 Likes

The entire paragraph can now be moved.

You can click the mouse three times in a row in a paragraph, select the whole paragraph, and then drag up or down to change the position.

3 Likes

Good to know that mouse click three times, selects a paragraph. Is there a shortcut to select a line (like VS Code)?

Maybe I misread this, but you can already remap hotkeys in Obsidian under Settings, and I would expect any of the hotkeys mentioned in this post could be remapped.

You are completely right, my bad.
For some reason I thought it was not implemented yet.

+1 and it would be really nice to add some drag and drop functionality.

For example draging form the bullet marker (-, 1.) to reorganize (and maybe nest) bullets.

4 Likes

Zettlr is open source, also based on Electron and has better text manipulation functions.
CTRL + click to place multiple pointers;
SHIFT + end to select the entire paragraph (not just the line);
ALT + Up / Down to move.

It may be easy to import these functions from him.

3 Likes

You can place multiple pointers (alt + click for me).

2 Likes

A heads up that you if you have a bullet list you can use tab to nest it inwards and shift + tab to nest it outward.

1 Like

@argparse I too can place multiple cursors with alt + click BUT the subsequent implementation/execution seems buggy in my version. Are others experiencing the same?

@goodsignal I feel the same way about having a shortcut to move lines up and down in my text files - it’s essential.

I’m not too fussed on the particular difficult shortcut (sublime, vs code both have different defaults) especially if it can be remapped anyway.

1 Like

Alt+click is a little buggy for me too. If you’re also on windows @cognociente, I know why it’s buggy and have a work-around.

The problem is that whenever Alt is pressed and released without another modifier key, that’s the OS shortcut to activate the menu bar and focus is removed from the Obsidian Edit window to the the menu bar. The buggy workaround is that you have to press and release Alt again for the OS to toggle focus back the Obsidian Edit window where you can resume your multi-cursor editing.

It would be nice if a more graceful implementation could be figured out.

@goodsignal well picked up! Seems that it would then be best for Alt based shortcuts to be avoided because underlying browser functionality won’t change. Maybe Control should rather be used as the modifier for the mouse click?

1 Like

This is absolutely crucial for me too - I was all-in on moving all of my notes from OneNote to Obsidian until I just found out here that this isn’t possible. It’s such a basic feature that I just assumed that it was already implemented.

When I’m writing, I just do a stream of consciousness and dump everything in a very poorly organized tree of bullet points. Once done (or sometimes during the process) I will rearrange the points into a more coherent order - keyboard shortcuts (OneNote uses Alt+Shift and arrow keys to move in/out/up/down) make this incomparably faster than dragging or cut and paste.

I’m extremely disappointed - I don’t think I can use Obsidian (which otherwise looks extremely promising) without this.

A related feature is to add/remove bullets from a selection of lines (at any indent level) with one command. Again, OneNote you just press Ctrl+. or / for ordered lists (numbers).

3 Likes

You can swap the current lines up and down using either the command palette or by setting hotkeys for “Swap lines up” and “Swap lines down”:

1 Like

Yup, it was a great addition! Now I’d just love to see in/outdent added to the customizable hotkeys so I can make my “joystick” with the arrow keys!

2 Likes