obsidian-switcher-plus icon indicating copy to clipboard operation
obsidian-switcher-plus copied to clipboard

searching for `@` and `edt ` in switcher-plus

Open manogna4 opened this issue 4 years ago • 6 comments

I cannot search for filenames using @ and edt These are allowed characters in filenames in windows, but using these characters in switcher-plus activates the symbol navigation and editor navigation functions. I need to resort to the native switcher to search for these files.

manogna4 avatar Jan 22 '21 10:01 manogna4

Currently if an exact match for the command is found, it immediately switches to that mode. So unfortunately, searches that start with "@ " or "edt " (those exact strings) it will trigger into those modes - which I imagine would be rare. Similarly for "@" anywhere in the search string. I'll look into this soon, thanks for the report.

darlal avatar Jan 23 '21 04:01 darlal

Same here. I have lots of notes whose title includes email addresses or twitter handles.

huyz avatar Jul 18 '22 11:07 huyz

A nice feature of Quick Switcher++ is the ability to change the mode triggers. And the triggers can be more than one character.

For example, I modified all mode triggers to be a single character followed by a space. The leading character / trailing space combination is unlikely to be part of a string that I want to search for -- hasn't been yet, anyway. Also changed the 'edt' trigger to '- ' (no single quotes, in the trigger).

Randy-Astle avatar Aug 22 '22 22:08 Randy-Astle

I'm guessing that doesn't help with @ triggering from anywhere in the search string

huyz avatar Aug 23 '22 00:08 huyz

I haven't tested it since I don't have a use case for @s in a search string. (I'm also not sure why an @ embedded in the string would trigger a mode -- my understanding is that only the first character or characters are used to trigger the mode).

However, it may fix it if you are using an @ (@ followed by space) character pair -- if I understand correctly, in the embedded @ scenario, the @ will always be immediately followed by non-whitespace character?

You can also change the trigger character for symbol mode to a different character or series of characters. (Until the bug is resolved if you prefer @).

Randy-Astle avatar Aug 24 '22 13:08 Randy-Astle

@Randy-Astle you're right, that worked. Thanks!

huyz avatar Aug 24 '22 15:08 huyz

every time I toggle "Quick Switcher ++: Open in Editor Mode" hotkey, the search field is prepended with edt and I have to wipe it out before beginning my file lookup

I've tried uninstalling, reinstalling, changing hotkeys, doesn't matter. Anyone else experiencing this? Great plugin btw! 👍

kylebradshaw avatar Mar 14 '23 15:03 kylebradshaw

@kylebradshaw edt is the default trigger characters for Editor Mode, so the Quick Switcher ++: Open in Editor Mode global command is just a shortcut to put the switcher into that mode. This is expected behavior, and unrelated to the issue in the thread. Please let me know if I've misunderstood the behavior you are seeing. Thanks.

darlal avatar Mar 18 '23 15:03 darlal

@kylebradshaw edt is the default trigger characters for Editor Mode, so the Quick Switcher ++: Open in Editor Mode global command is just a shortcut to put the switcher into that mode. This is expected behavior, and unrelated to the issue in the thread. Please let me know if I've misunderstood the behavior you are seeing. Thanks.

I think I understand. I was conflating 2 things I thought it was about opening a new file in editor mode. Got twisted up! Thanks! (coming from dendron and learning the differences) Thank you for the response

kylebradshaw avatar Mar 20 '23 13:03 kylebradshaw