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

When user presses Return with the cursor in the middle of a task line, move cursor to end of line instead of dividing line in two #2862

Open
4 tasks done
claremacrae opened this issue May 29, 2024 · 0 comments
Labels
display: live preview Issues referring to Obsidian's Live Preview mode display: source mode Issues referring to Obsidian's Source Mode View type: enhancement New feature or request

Comments

@claremacrae
Copy link
Collaborator

⚠️ Please check that this feature request hasn't been suggested before.

  • I searched previous Ideas in Discussions didn't find any similar feature requests.
  • I searched previous Issues didn't find any similar feature requests.
  • I am only requesting a single feature. Multiple changes should be split into individual requests, with links between them.
  • I believe my requested feature will be generally applicable to other users, not just me: it is not uniquely tied to my personal workflow.

🔖 Feature description

Suppose I have been editing a task line, such as this one:

- [ ] I am a task with some emojis ⏫ 🔁 every day ➕ 2024-05-29 🛫 2024-05-28 📅 2024-05-29

And so my cursor is some in the line, say before emojis

If I press , the result is that the one task is broken in to two:

- [ ] I am a task with some 
- [ ] emojis ⏫ 🔁 every day ➕ 2024-05-29 🛫 2024-05-28 📅 2024-05-29

✔️ Solution

A much more useful result would be this, with the cursor at the end of the second task line

- [ ] I am a task with some emojis ⏫ 🔁 every day ➕ 2024-05-29 🛫 2024-05-28 📅 2024-05-29
- [ ] 

It would ideally need to work in both Source Mode and Live Preview.

❓ Alternatives

Currently the user has to know to move the cursor to the end of an existing task line before pressing Return.

📝 Additional Context

This was a suggestion originally made by @hmijail - embedded within #2786 (comment)

And which I formatted and summarised in #2786 (comment):

Quoting and reformatting:

To fix this, the just-finished line should keep the creation date. Maybe the plugin could detect on an Enter press that the caret is:

  1. in a task line and
  2. there's only emoji+dates after the caret,

and then move to the next line without dragging them on.

That is a very good idea, and I don't recall it being made before - and it will get lost here, and is not specific to Creation date.

A separate feature request, with a thorough description, would be very welcome.

@claremacrae claremacrae added the type: enhancement New feature or request label May 29, 2024
@claremacrae claremacrae added display: source mode Issues referring to Obsidian's Source Mode View display: live preview Issues referring to Obsidian's Live Preview mode labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display: live preview Issues referring to Obsidian's Live Preview mode display: source mode Issues referring to Obsidian's Source Mode View type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant