Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Quick Copy, Paste with Indention & Expand Selection #1

Closed
chrisgrieser opened this issue Sep 28, 2021 · 8 comments
Closed

Comments

@chrisgrieser
Copy link
Contributor

Hi, thanks for this useful plugins! I like the idea, it's simple but still useful. I use Sublime and I'd love to see the following commands added to Obsidian via this plugin as well.

  • Expand Selection to next match (Sublime Command:find_under_expand)
  • Paste & Indent (Sublime: paste_and_indent)
  • Expand to Brackets (Sublime: expand_selection to brackets)
  • Quick Copy & Quick Cut: without selection, using copy or cut will instead copy/cut the whole line (Sublime: copy_with_empty_selection, found in the preference section, not the keybindings section)
@timhor
Copy link
Owner

timhor commented Sep 29, 2021

Thanks for the feedback and suggestions! I'll address each one individually:

  • Expand selection to next match: I can implement expanding the selection from a cursor to the word it's in – is that what you're after with this one? The multi-cursor aspect is out of scope at this stage as I haven't looked into how it works in Obsidian yet.
  • Paste and indent: can you provide an example of your use case, since this feature seems more applicable to writing code?
  • Expand to brackets: sure, I can look into this for the next version.
  • Quick copy/cut: these already seem to work out of the box for me, is that not the case for you?

@chrisgrieser
Copy link
Contributor Author

chrisgrieser commented Sep 29, 2021

Expand selection to next match: I can implement expanding the selection from a cursor to the word it's in – is that what you're after with this one? The multi-cursor aspect is out of scope at this stage as I haven't looked into how it works in Obsidian yet.

Too bad, it's mostly the multiple selections of a term. 😕

Paste and indent: can you provide an example of your use case, since this feature seems more applicable to writing code?

when copying content from one list to another one that has a different indention level, you have the issue that indention is wrong, I believe.

Expand to brackets: sure, I can look into this for the next version.

thanks! <3

Quick copy/cut: these already seem to work out of the box for me, is that not the case for you?

👀 Didn't notice that Obsidian already does that. TIL.

@timhor
Copy link
Owner

timhor commented Sep 29, 2021

Too bad, it's mostly the multiple selections of a term. 😕

Fair enough; I'd like to explore multiple selections at some point for sure, but no guarantees as I don't know what the API looks like, or if one even exists at the moment 😅

when copying content from one list to another one that has a different indention level, you have the issue that indention is wrong, I believe.

Ah I see, so it usually happens in nested lists. I'll keep it in mind for now, but from my experience, there are a number of edge cases to consider with nesting and paste (different users have different expectations) so it might not be as simple as it sounds.

@timhor timhor added this to Done in Code Editor Shortcuts Oct 4, 2021
@timhor timhor moved this from Done to To do in Code Editor Shortcuts Oct 4, 2021
@timhor timhor removed this from To do in Code Editor Shortcuts Oct 4, 2021
@timhor
Copy link
Owner

timhor commented Oct 16, 2021

Expand to brackets is now available in v1.2.0

@chrisgrieser
Copy link
Contributor Author

thanks 🥳

@timhor
Copy link
Owner

timhor commented Oct 17, 2021

@chrisgrieser I was browsing through some existing plugins today and came across https://github.com/jglev/obsidian-paste-to-current-indentation. Perhaps that might fit your use case for paste and indent?

@chrisgrieser
Copy link
Contributor Author

thanks!

However, "Expand Selection to next match" is the one I am missing the most :(

@timhor
Copy link
Owner

timhor commented Apr 24, 2022

Expand selection to next match is now available in https://github.com/timhor/obsidian-editor-shortcuts/releases/tag/1.8.0 under 'Select word or next occurrence of selection'!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants