vim-win icon indicating copy to clipboard operation
vim-win copied to clipboard

Window jump supports English letters

Open Archdsenna opened this issue 1 year ago • 4 comments

Hi, I am very happy to use this plug-in, which speeds up my window switching. However, I found that I can only use the number keys when switching windows. I checked the help document and found that it does not currently support setting the window numbering style. Considering the cost of key switching, on my keyboard, the number keys are at the top of the keyboard. When I want to press the number keys to jump to the window, I have to move my fingers away from the keyboard core area, press the number keys at the top and then return to the main key position, which interrupts the finger key layout. If the window panel can be represented by English letters, it will be much faster to switch to the window of the corresponding letter without moving the fingers away from the keyboard core area. So whether it can support the function of customizing the window numbering style, I think this is very useful for switching windows at a very low cost. image

Thanks again!

Archdsenna avatar Aug 18 '24 03:08 Archdsenna

Sorry, the question I asked doesn't seem to make sense, because English letters may be mapped to custom action commands, for example in the g:win_ext_command_map variable, so the current way is very good, I will close this issue. Thanks again for this useful plugin!

Archdsenna avatar Aug 21 '24 05:08 Archdsenna

Hi @Archdsenna, thanks for proposing the idea. In addition to custom commands, the plugin supports 1) movement keys (h, j, k, l) for navigating windows, 2) s for swapping buffers, and 3) w for window navigation. Those would also conflict with using letters for windows.

But I think there is still a way to add the functionality you proposed. For example, a key like g could be used to enter letter mode. When pressed, the numbers would be changed to letters, and letters could be used for navigation. The existing letter functionality would not be available. There could be a way to enter this mode by default (so g wouldn't need to be pressed, saving a keystroke).

dstein64 avatar Aug 21 '24 13:08 dstein64

Hi @Archdsenna, thanks for proposing the idea. In addition to custom commands, the plugin supports 1) movement keys (h, j, k, l) for navigating windows, 2) s for swapping buffers, and 3) w for window navigation. Those would also conflict with using letters for windows.

But I think there is still a way to add the functionality you proposed. For example, a key like g could be used to enter letter mode. When pressed, the numbers would be changed to letters, and letters could be used for navigation. The existing letter functionality would not be available. There could be a way to enter this mode by default (so g wouldn't need to be pressed, saving a keystroke).

Great idea, if I press a key, such as g, I can convert letters to digital display, so that when there are multiple windows, I don't need to press h/j/k/l to reach the target window. Of course, this is just to quickly switch to the target window among multiple windows. The rest of the time, we can still use letter commands normally, which is more reasonable than the English letter navigation I thought before. Will this feature be supported in the future?

Archdsenna avatar Aug 21 '24 14:08 Archdsenna

"Will this feature be supported in the future?"

I'm planning to add the feature described above. I'll reopen this issue.

dstein64 avatar Aug 22 '24 02:08 dstein64

I've added a letter mode that can be entered with g. In letter mode, the window labels show letters that are used for navigation instead of window numbers.

"There could be a way to enter this mode by default (so g wouldn't need to be pressed, saving a keystroke)."

I didn't add a way to make this the default mode; under the current implementation, using g is required for letter mode. I'll possibly revisit this in the future.

dstein64 avatar Oct 20 '24 02:10 dstein64