Hotkey select text blocks w/o whitespace/formatting

I am trying to accomplish the speedy creation of links from list items. I am also trying to accomplish the easy selection of blocks of text without the extra white space before and after the text.

When searching for this feature, I found it reported as a bug. Triple click to select block and then applying styling is buggy

However, I see a solution that could be separate from the triple quick behavior, although that would solve the problem.

I think it would be efficient to have a hotkey to select just the text of an entire block of text based on where the cursor is when the keys are triggered.

Currently, I create macro scripts depending on the context. For example, I have one that moves from the beginning of a line in a formatted list of checkboxes and selects an entire line of text from just before the first actual character of text then steps back deselecting the extra white space. Having this requested feature, would be better than my current workaround in that I wouldn’t be limited to just lines of text that do not spill over to next line.

Thanks.

1 Like

Hi @I-d-as
Did you find a workaround for this?

Looks like there is an old Trim Whitespace plugin. To trim the leading whitespace on a line, you can press Shift + Tab to unindent. But because Live Preview hides the leading and trailing whitespace, I don’t find this to be a problem. If a situation arose where I needed it removed, I would possibly try to use search and replace with regex in VS Code to remove the whitespace. It’s worth noting that when you click a link for a note that hasn’t been created yet, Obsidian trims the leading and trailing whitespace when naming the note.

1 Like