philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
23.36k stars 2.48k forks source link

Allow lowercase letter in linkhint #3286

Open olivierroche88 opened 5 years ago

olivierroche88 commented 5 years ago

LinkHints does not honor lower case even if you specify them in the "Characters used for link hints" option page. I think the "linkHintNumbers = Settings.get("linkHintNumbers").toUpperCase();" in "function FilterHints" should not exist. If user specified lower case in the "Characters used for link hints" option page, it's reasonable to assume they know what they are doing.

gdh1995 commented 5 years ago

Um, usually on a keyboard there're upper-case letters. So I think it's normal to show all UPPER CASE ones. Personally, I set the "Characters used for link hints" using lower-case letters so that the options page looks better for me, while the upper case ones when hinting are easy to read and find (just for me).

olivierroche88 commented 5 years ago

Hello, personally I have changed all vimium keys via the options menu so that their action is never triggered via normal keys but only via Control keys or function keys or key sequence using 'ù' as prefix. I keep the 26 lower case letters for link hint as it is then super fast (no need to shift). If you maintain your policy that would be nice to warn user that if they specify lower case letters in the field "Characters used for link hints" of the option page, they will be forced to upper case.

On Thu, Apr 4, 2019 at 7:09 PM Dahan Gong notifications@github.com wrote:

Um, usually on a keyboard there're upper-case letters. So I think it's normal to show all UPPER CASE ones. Personally, I set the "Characters used for link hints" using lower-case letters so that the options page looks better for me, while the upper case ones when hinting are easy to read and find (just for me).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/philc/vimium/issues/3286#issuecomment-479983831, or mute the thread https://github.com/notifications/unsubscribe-auth/AqtJO9dmryANKrbVv8LnzmL_1ku1wgcmks5vdjHGgaJpZM4ccPUg .

-- Olivier Roche Tel: 06 28 09 77 93

gdh1995 commented 5 years ago

Sorry I misunderstood what you were pointing to, and expressed my opinions about "linkHintCharacters", but not "linkHintNumbers" (these 2 options are controlled by "Use the link's name and characters for link-hint filtering" on Vimium Options page).

When "linkHintNumbers" (whose initial value is "0~9") contains letter characters, Vimium tends to think:

I think this process is useful and clear enough, while if you wants to use lower-case characters fastly, I suggest that you may uncheck the "Use the link's name and characters for link-hint filtering" on the options page and then configure "Characters used for link hints" using some of 26 letters.

olivierroche88 commented 5 years ago

Yes, I understand your point of view. Your implementation is more versatil for sure and is well suited to English like kbd where number don't need to be shifted. In that case the default setting "123456789" for "Characters used for link hints" is really handy. On french kbd, we unfortunately need to press the shift key to access number, this quickly become heavy... So in my case, I prefered stopping using the character search in links' "hint text" list and ONLY use the selection via unique ID in lower case. So I merely modifieded in 'content_scripts/link_hints.js' the 'function FilterHints' to have 'linkHintNumbers = Settings.get("linkHintNumbers").toLowerCase();' instead of 'linkHintNumbers = Settings.get("linkHintNumbers").toUpperCase();' To have an efficient support of BOTH kbd type, you could add a toggle switch in the option that when used would transform the meaning to:

On Fri, Apr 5, 2019 at 3:08 PM Dahan Gong notifications@github.com wrote:

Sorry I misunderstood what you were pointing to, and expressed my opinions about "linkHintCharacters", but not "linkHintNumbers" (these 2 options are controlled by "Use the link's name and characters for link-hint filtering" on Vimium Options page).

When "linkHintNumbers" (whose initial value is "0~9") contains letter characters, Vimium tends to think:

  • if a user presses a letter key, he/she wants to search the character in links' "hint text" list;
  • if a user presses + "A~Z" (generating a UPPER-CASE character), then he/she means to visit a link by typing a unique ID (the text before ": ") of hint.

I think this process is useful and clear enough, while if you wants to use lower-case characters fastly, I suggest that you may uncheck the "Use the link's name and characters for link-hint filtering" on the options page and then configure "Characters used for link hints" using some of 26 letters.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/philc/vimium/issues/3286#issuecomment-480268976, or mute the thread https://github.com/notifications/unsubscribe-auth/AqtJO3KVyo4j8XMz9Ru28KSNe74pSQf-ks5vd0rpgaJpZM4ccPUg .

-- Olivier Roche Tel: 06 28 09 77 93

gdh1995 commented 5 years ago

Um, quite a interesting problem. I think the simplest solution (working-around?) is that you compiled Vimium by yourself ...

Vimium is used to be conservative, and since for recent years only you files such a issue, it's hard to say whether / when Vimium will accept the solution to add a special switch just for this "small" detail.

BTW, I personally think such tools like Vimium (to some degree) have to "train users", but not add more and more switches.

olivierroche88 commented 5 years ago

yes, that's what I did. Vimium is a very nice addon (even for emacs junkee like I ;)

On Fri, Apr 5, 2019 at 5:07 PM Dahan Gong notifications@github.com wrote:

Um, quite a interesting problem. I think the simplest solution (working-around?) is that you compiled Vimium by yourself ...

Vimium is used to be conservative, and since for recent years only you files such a issue, it's hard to say whether / when Vimium will accept the solution to add a special switch just for this "small" detail.

BTW, I personally think such tools like Vimium (to some degree) have to "train users", but not add more and more switches.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/philc/vimium/issues/3286#issuecomment-480310827, or mute the thread https://github.com/notifications/unsubscribe-auth/AqtJO98smD_hS-5aR-egU9mW0On-_OH1ks5vd2aogaJpZM4ccPUg .

-- Olivier Roche Tel: 06 28 09 77 93

gdh1995 commented 2 years ago

Update: today I noticed the CSS text-transform property can convert text to its lower-case versions, and .vimiumHintMarker > .vimiumReset { text-transform: lowercase !important; } should help.

image

To1ne commented 6 months ago

@gdh1995 This helped a lot. Thanks a bunch!