deb0ch / emacs-winum

Window numbers for Emacs - Navigate windows and frames using numbers
143 stars 13 forks source link

add an alternative function of winum-select-window-by-number #14

Open casouri opened 6 years ago

casouri commented 6 years ago

Currently if you want to jump to window2 with (winum-select-window-by-number ) and and there is no window 2, there will be a error warning you there is no window 2 and nothing happens. What if you can just call a function like (winum-jump-or-split 2) and if there is no window 2, you can split the screen how ever you like and jump to the new screen?

I did something like that as show below. SPC 1-9 is bind to that winum-jump-or-split

split-to

When I hit SPC 2 and there is no window two, I was instructed to hit h/j/k/l to split screen to left/down/up/right. When I hit "l" thw screen spitted to right. And when there is a window 2 I just jump to that window. Note: If there is 2 window and you hit SPC 4 and spitted screen, the new window will be marked number 3 instead of 4.

Do you think it's worth adding to winum as an alternative of winum-select-window-by-number?

deb0ch commented 6 years ago

Why not send a PR ? That sounds like an interesting idea that deserves investigating 😸

casouri commented 6 years ago

I thought I'll PR if you like it. 😄