lem-project / lem

Common Lisp editor/IDE with high expansibility
http://lem-project.github.io/
MIT License
2.39k stars 176 forks source link

feature: add new commands to `switch to` or `create` a specific frame-multiplexer. #1595

Closed sakurawald closed 2 days ago

sakurawald commented 2 days ago

Taken this example, you can see here are 6 frame-multiplexers, which are indexde from 0 to 5. image

I would like some new commands like frame-multiplexer-switch-0, frame-multiplexer-switch-1, frame-multiplexer-switch-2, instead of using frame-multiplexer-next and frame-multiplexer-prev continuously.

These shortcut command will make the switch of frame-multiplexer much easier and smooth. For example, in vi-mode, i can just press Space 4 to switch to the frame-multiplexer whose index is 4.

cxxxr commented 2 days ago

There is a M-x frame-multiplexer-switch command. Is this not enough?

sakurawald commented 2 days ago

There is a M-x frame-multiplexer-switch command. Is this not enough?

It would be better if there exists a short cut command for quick frame-multiplexer switch. In a typical work-flow, we usually open tabs less than 10 tabs, so if there are commands for each tab indexed from 0 to 9, then we can bind these commands to something like Space 1 and Space 2.

Given this example configuration for ideavim plugin for jetbrains's IDEs, where the GoToTab1 is the official command provided by Jetbrains:

" window
nmap <C-Tab> <Action>(PreviousTab)
nmap <Tab> <Action>(NextTab)
nmap <leader>p <Action>(PinActiveEditorTab)

nmap <leader>1 <Action>(GoToTab1)
nmap <leader>2 <Action>(GoToTab2)
nmap <leader>3 <Action>(GoToTab3)
nmap <leader>4 <Action>(GoToTab4)
nmap <leader>5 <Action>(GoToTab5)
nmap <leader>6 <Action>(GoToTab6)
nmap <leader>7 <Action>(GoToTab7)
nmap <leader>8 <Action>(GoToTab8)
nmap <leader>9 <Action>(GoToTab9)

It makes the switch of tabs much easier and smooth.

cxxxr commented 2 days ago

OK, I added those commands. https://github.com/lem-project/lem/pull/1596

sakurawald commented 2 days ago

Thank you, now i didn't need to use prev and next continuously. I can say that the lem editor makes the learning of common lisp much funny and easier.

cxxxr commented 2 days ago

Thanks for the feedback, and please keep it coming