jglev / obsidian-paste-mode

Obsidian Notes plugin for pasting text and blockquotes to the cursor's current level of indentation.
Other
48 stars 2 forks source link

Dedent content before pasting it to current indentation #29

Open ivan-lednev opened 1 year ago

ivan-lednev commented 1 year ago

Suppose I have some code:

class Foo {
    bar() {
        doStuff()
    }
}

When I copy some fragment from it, say:

bar() {
    doStuff()
}

I'd like the content to be dedented. So instead of this:

- list
    - sublist
      bar() {
          doStuff()
      }
  ```

I'd like to see this:

```md
- list
    - sublist
  bar() {
      doStuff()
  }
  ```
jglev commented 1 year ago

Thank you for reaching out! I'm sorry for my delay in responding; it's been a busy few months! I'm writing just to say that this is on my radar, and I'm starting to think through it. What you describe wanting to see is the intended behavior of the plugin, so I'm starting to look into this as a bug.