sawhney17 / logseq-automatic-linker

MIT License
87 stars 16 forks source link

Automatically parse but detect only (instead of creating the link) #50

Open redactedscribe opened 1 year ago

redactedscribe commented 1 year ago

Perhaps Automatic Linker could add a kind of manual submode to the two automatic modes currently present, enableAutoParse and stateKeybinding (Automatic Parsing).

FR example: When Automatic Parsing is toggled on, append an inline clickable icon to each detection instead of automatically linkifying them. Now you can go through and click any detections that you'd want to be made into a link. This should also work with the auto parse mode too.

If FR #49 is implemented, then perhaps modifier-clicking on the inline icon will keep the capitalisation.

It wouldn't necessarily have to be an inline icon that's clicked, but I can't think of anything else clickable that would be a better user experience (Copy Code does an inline icon thing pretty well, but I think the detection icons should always be visible until clicking away from the current block). Converting a detection into a link should be doable via mouse or keybinding.

Thanks.

jaroet commented 1 year ago

I wanted to create a FR for something like this but found this issue that resembles my wishes close enough to not make a separate issue. Personally I like the way https://github.com/tadashi-aikawa/obsidian-various-complements-plugin does it for Obsidian a lot.

While typing a word in the block a small dropdown list is shown with matching internal links. You can select one of those or continue typing and then nothing happens untill you get to the next word. Advanced features would be to prevent searching for words with X characters or less. I use it in Obsidian and it works wunderfully well.

The main advantage is that you define a link (or not) at the moment you are adding it. No need to go back after you have writen the sentence or finished the block. And also most of the time I only mention a link once in a block. For instance I can use a name of somebode like 5 times in a larger block but I want to have only 1 of those to be a link and the others not. This is to not make the block 'busy' with links while in fact there is only one link important.

The always and everything linking of this plugin is not working for me and as such I am not using it while I think the functionality 'an sich' is very nice en very good to have.

redactedscribe commented 1 year ago

A drop-down would be better in terms of not having the current line shift sideways to accommodate an inline icon, and Automatic Linker could easily provide a list of close matches.

If an inline icon idea was chosen, it'd probably be better if the icon didn't show until clicking away from the line (the opposite of what I said initially) as this would avoid any shift on the current line as you type.

If you want to get your links made as you type, a drop-down would work better, but it could also be considered distracting depending on whether you prefer to focus on writing first and linking later; I don't necessarily want to contemplate whether a link would be relevant or not in the moment.

The drop-down UX is probably best overall as its more familiar (code completion). Maybe there could a choice between reviewing detections as you type and reviewing detections later.

jaroet commented 1 year ago

An addition to why I like links to be shown in a drop-down at the time I write them is I use a lot of multi word pagenames. In fact most of my pages have multi-word pagenames and I have to write them out completely to get a good match with the auto linker.

And most of the time I know I have a page but I am not always a 100% sure about the name of the page. For instance I have page "HELM" and "HELM tips" but the tips started on the helm page untill it became to many and I moved them to a separate page. But I am not sure if I did that already. The pop-up drop-down helps me with that. One typing error and the autolinks after the sentence is written and the link is not made.

Having used to plugin for a short while I find I keep asking myself if the links I want are completed as I want. I can't trust it enough (it is not the plugin but the mistakes I make while writing things down). Also when I don't want to have a link I have to remove it after using CMD-p.