zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.93k stars 1.17k forks source link

How to Exit Micro Using a Single KeyPress, When Several Tabs are Open #2788

Open spaceman5 opened 1 year ago

spaceman5 commented 1 year ago

Hi

Thank you very much for creating micro, it's my favorite Editor on Linux!

I have a question please.

If I run micro with several files as parameteers, to open several tabs, example: micro file1.txt file2.txt file3.txt file4.txt

How can I then exit micro using 1 keypress?

If I press Ctrl-Q, it only closes the current tab, and so, If you have N tabs open, you need to press N times Ctrl-Q in order to quit.. Is there a key that Exits by closing All tabs?

Thank you

zyedidia commented 1 year ago

There is no default binding to quit all windows, but the QuitAll action will do this, you just have to bind it to a key of your choice in ~/.config/micro/bindings.json.

spaceman5 commented 1 year ago

Thank you very much, I will do it now.

BTW, If I may suggest, maybe a small setting that makes Ctrl-Q to Quit All when more than 1 tab is open, might be useful for other people. (because they may not know of the QuitAll action).

BTW, 1 more thing regarding tabs: If you run: micro file1.txt file2.txt file3.txt file4.txt then you get 4 tabs, and the first tab is the active one. Is it possible to run micro with several files (tabs), and specify which tab # should be the active one?