Customizing word boundary/selection behavior?

I’m wondering if there is any way to change the logic for what gets selected as a “word” when double-clicking a string in Obsidian.

What I’m trying to do

I work with a lot of network device info that includes hostnames, addresses, etc. which use various tokens such as . _ - : between elements, so if I double click on a part of one of them it will not end up selecting the whole thing. For example double clicking anywhere in an IPv6 address such as 2211:caba:ffff:90:: will at most get me a block of non-punctuation characters. I’d like to be able to specify which characters do or don’t delimit word boundaries to make it easier to select these in my normal workflow.

As an example of how other apps handle this, the terminal app iTerm2 has something called Smart Selection to enable a better experience: Smart Selection - Documentation - iTerm2 - macOS Terminal Replacement

Things I have tried

Double clicking will only select a block of alphanumeric characters, triple clicking selects the whole line.

Not exactly what you’re asking about, but a workaround I use, if you’re interested:

Put the “phrases” into their own code blocks. That gives you a handy click-to-copy button on the top right.

IPv6
```
2001:db8::2:1
```

MAC
```
00:1A:2B:3C:4D:5E
```
1 Like