yorickpeterse / nvim-window

Easily jump between NeoVim windows.
Mozilla Public License 2.0
97 stars 9 forks source link

add option to force uppercase #7

Closed jam1015 closed 5 months ago

jam1015 commented 5 months ago

with the plugin as it is now, to select uppercase hint characters, the user has to actually press shift or turn on caps lock to select them. the changes here add an option to the config that

1) converts all lowercase hint characters to uppercase 2) automatically converts keyboard input to select a window to uppercase so the user doesn't have to press shift

yorickpeterse commented 5 months ago

The default configuration uses the characters a to z, giving you a total of 26 windows you can choose from. The only time you'd need capitalized letters is if you have more than 26 windows. If you have more than 26 windows in one tab page, you'd end up with incredibly tiny windows (even on a large display), such that I have to ask: what on earth are you doing you need that many windows? Also, if everything is capitalized then you still have only up to 26 windows to choose from.

If you do need capitalized hints for some reason, them requiring Shift is very much the point, otherwise why not just use lowercased hints?

The code itself is also weird and looks to be generated (e.g. using Copilot). For example, it uses fn.nr2char(char):gsub("%a", string.upper) to uppercase a letter when you can literally just use fn.nr2char(char):upper(). Similarly, the use of camelCase doesn't match the rest of the code.

With all this in mind, I have to ask what the point is of these changes? It doesn't seem to solve any legitimate problems, and at risk of sounding a bit rude, the state of the changes comes off as rather lazy.

yorickpeterse commented 5 months ago

Having thought about it, I'm simply going to close this PR based on the above. Even with more details provided, this PR makes no sense and as such isn't going to be merged anyway.

jam1015 commented 5 months ago

It is a purely aesthetic adjustment. I just like seeing capital letters, and don't want to press shift. I think that makes sense!

Yes I used chatgpt to help write this, but made sure I understood what each line of code did. You're right, I should have looked for simplifications and made sure the formatting fit the code already in the repo.