obsidian-block-drag-n-drop
obsidian-block-drag-n-drop copied to clipboard
Move block, leave children in place
I would like a modifier key to move a block without the child items. Right now I am using tab and shift tab to clean up hierarchy of list items before or after moving things, or I am moving them one line at a time with the keyboard hotkeys. Maybe a use for alt key to offer this option. One modifier key on/off is good for me, but for finer control maybe use number keys to set level of sub items to to leave behind. Just a thought.
Hi! Technically it's not complex but we should think about detailed behaviour:
- Where should children go? To the previous item?
- What if we move first item? There is no next item to became parent for children. Should we just forbid moving first item?
Hello
Here is a possible idea and my reasoning as best I can explain.
-
When moving or copying blocks the drag and drop is replacing cut/copy and paste, so the behavior should be the same as if the block was cut.
- Child stays in place, at same level. Even when it becomes new first item in list.
- I don’t know technically, but I guess if you have a two item list (one parent & one child), and you moved the parent, this would create two separate lists then, making the child item it's own list. Does the plugin require a list to append to? Can it paste into place, essentially, from a user point of view?
-
Current behavior is similar to highlighting multiple lines of the list, and works as expected across different files.
-
One issue partly related to this is that all moved blocks loose one level of hierarchy when moved. Maybe behavior should be same as swapping lines up and down. So drag and drop (standard) would be similar to highlighting multiple lines and swapping up and down with hotkey.
-
I know this plugin is more for embedding into different files, but it greatly improves the outline functionality.
-
I can create separate option in options, so you can assign it to modifier. Technically it's not a big issue, but keeping child items in place sometimes will produce weird results like:
- item1 <- move this item
- item2
- item3
- item2
- item3
Regarding nesting level - it will be fixed as part of ticket #6 with ability to choose between "move" and "nested" behaviour
That looks good. While it might not be ideal to leave sub-items, I think it should be the expected result.
To be clear, I made this feature request with writing projects (fiction) in mind, where structure can be messy and loose, but I found a video of Dave Winer saying this should never happen because of the structure of the outline. He might be the expert on outliners. Anyway here is the video link for your reference. https://www.youtube.com/watch?v=1r19K2sXXJs