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

Link Dialog improvement suggestions #487

Open
igormcampos opened this issue Jul 14, 2018 · 10 comments
Open

Link Dialog improvement suggestions #487

igormcampos opened this issue Jul 14, 2018 · 10 comments

Comments

@igormcampos
Copy link

igormcampos commented Jul 14, 2018

Hello, the link to another page function is the one I most use on this software, so I'm going to list some things that annoys me a little, maybe there's a way to circle these, so please let me know if you have a way to do that.

  1. After using a subpage indication (:) the Ctrl+ L (linking pop-up) doesn't fuzzy search anymore, more than that it even becomes case-sensitive. Example:
    If I want to find a page that is called "The Citadel" inside the page "Maps" I could do the following to link it:
  • Ctrl + L and type "cit" and it will pop up at the bottom as a suggestion
    or
  • CTRL + L and type "maps:cit" (but this doesn't work, doesn't show as a suggestion or anything) even if you type "maps:the cit" it won't work
    It will only work if you type exactly the title "Maps:The Cit" that will suggest the complete title
  1. There's no way to check the name of the page if you are linking one with a path too long. If the path is something like ":Places:Navigation:Maps:The Citadel" it will probably not show the last part on the sentence and if there's something like "The Bridge" also there it will probably be hard to find yourself. One simple way to make this work is the page suggestion to be aligned to the right? This way you could see the titles of the pages since the path is not that important. I think this image explains it better:
    image

  2. Text should reflect the title of the page, not the path. Using the prior example it is something like
    It should be like this:
    image
    And not this:
    image

Having to manually cut that part of the path every time I link something is very tiring.
Thanks for reading.

@Osndok
Copy link
Collaborator

Osndok commented Jul 14, 2018

Thanks for filing this. I have certainly been bugged by 1 & 2.

Number 3, while I'm pretty sure is trivial to implement, is not so straight forward regarding its general benefit...

Mostly because there are a great many cases where a page's basename is not adequate for a link text. Often the basename is just a number: like today's journal page would be "14", and its parent would be "07"... and links like "Bug:123", "Feature:123", or "Product1:Plan" & "Project2:Plan" would all reduce to unclear (or maybe... subjectively inadequate) link text.

But also because there are still some lingering bugs regarding relative links & mass renaming/moving that can leave misdirected links that you only find much later (when you need them).

In fact, I have personally been toying with using all absolute links, for these same reasons (a little uglier, but they are specific and don't break nearly so often).

@igormcampos
Copy link
Author

igormcampos commented Jul 14, 2018

@Osndok I see where you are getting with the 3, but I still think it would be a great change overall, or maybe an option to customize that on preferences?

About the mass moving, yes I suffered from that once, I suddenly noticed some strange pages that shouldn't be there, but I was able to move them because I noticed early on hahaha
My way to make that less annoying is using complete paths as you said, to make that easier I use macros on AHK to the most common pages that I have as "directories" or "groups", I also have a macro to circle 3, that removes all the path from a string, but it was a suggestion anyway hehe

@igormcampos
Copy link
Author

Not sure if someone would want this, but I'm gonna leave this here if someone is also troubled with the paths and page name, it's the macro I made for AHK, if you have it installed it's pretty easy to setup and I commented what each part does.
https://www.paste.org/flat/94067

@ecodiv
Copy link

ecodiv commented Jul 15, 2018

The macro looks like something I could use, but sure how to implement / use. Could you add some explanation for non-developers :-)

@igormcampos
Copy link
Author

igormcampos commented Jul 15, 2018

@ecodiv sure, let me try.

  1. First, you need to download a program called Autohotkey, or AHK for short.
  2. Then you need to install it, paste the code I left on the last post on a new file (could be something like macro.ahk, the extension ".ahk" is important.
  3. If you installed AHK, you can simply click the file and it will execute, a little tray icon will appear, when it's an "H" it's running, if it's an "S" it's suspended, the key I used for that is F1 but you can change it to anything by editing that first line that says something like F1::Suspend
  4. To customize the keys you will need to add several pieces of code like this one: https://www.paste.org/flat/94076
    1. The first line is the key assigned to the hotkey, in that case, it's Ctrl + M, you can see this page for reference about that https://autohotkey.com/docs/Hotkeys.htm.
    2. The second line is about using Ctrl + L (open the link to pop-up automatically)
    3. The third line the program will stop for 100ms to wait for the pop-up open
    4. The fourth line is the most important, it is the path to your hotkey, in that example, it will be ":Places:Navigation:Maps:" but can be changed to your most used pages.
    5. The fifth lines determine the end of a block of code, that means that when you press the key, in this case, Ctrl + M, it will only execute until that line (important)
  5. After creating several hotkeys (copy and paste, change the path and hotkey only), let's explain a little about the trim and save macro: https://www.paste.org/flat/94077
    1. The only thing you really need to change here is the first line, to your desired key, I used \ because it's easy to reach.
    2. Explaining briefly what it does: press tab 2 times, copy the content, clear the string leaving only the text after the last : and send that text back to the input dialog, after that it presses Alt + L (save the link).

Not sure if that helped, because it's a little hard to explain the code in text. Keep in mind that if you use a normal key as a hotkey, for example, B, B will be treated as the macro from then on and will not act as B anymore, unless you press the Suspend key (F1), or exit the tray icon. Also always you make changes to the file to test something you need to right click the tray icon and press reload, or exit and reopen it.

PS: to the save command (\) work as is, your cursor (text pointer [where you were typing]) should be at the end of the first text input:
image

Just complementing, if you can't use AHK because is on a Linux distro or something, the alternatives would be LDTP, XMacro, XBindKeys. But for that, you would actually need a little more coding knowledge.

@ecodiv
Copy link

ecodiv commented Jul 23, 2018

@igormcampos thanks, I am going to give it a try.

@StructByLightning
Copy link

An option to have new links default to having the page title as the link name would be wonderful.

@jaap-karssenberg jaap-karssenberg changed the title Linking improvement suggestions Link Dialog improvement suggestions Feb 11, 2019
@myrdd
Copy link

myrdd commented May 13, 2019

After using a subpage indication (:) the Ctrl+ L (linking pop-up) doesn't fuzzy search anymore

Thank you for filing this, I miss searching with strings including the colon. (I'm not sure if it's really fuzzy searching.)
BTW I'd be highly interested in fzf link search (for ”insert link“ and ”jump to“). fzf (and its integrations to command-line shells, vim, etc.) is a really really great tool. see https://github.com/junegunn/fzf


There's no way to check the name of the page if you are linking one with a path too long.

I had been running into that issue as well, but was able to work around it: I'm using KWin, and I simply added a new ”window rule“ for the ”Jump to“, ”Move Page“ and ”Search“ dialog windows, forcing them to be at least 800px wide. I'm using window title RegExp ^(Search|Jump to|Move Page) - Zim$. Here's a screenshot for demonstration:

Screenshot

KWin is the KDE/Plasma window manager, but can be used standalone. https://userbase.kde.org/KWin

@timelyfiasco
Copy link

To me, this addon solved problem 1 and 2.

@introt
Copy link
Collaborator

introt commented Dec 14, 2021

Related: More advanced matching for Jump To autocompletion #189

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants