Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support lowest possible ID for new terminal? #309

Closed
kvalv opened this issue Nov 24, 2020 · 0 comments
Closed

Support lowest possible ID for new terminal? #309

kvalv opened this issue Nov 24, 2020 · 0 comments

Comments

@kvalv
Copy link

kvalv commented Nov 24, 2020

:Tnew currently sets an ID based on the highest current terminal ID + 1, so if :Tls outputs 1, 3, 7 the new terminal will have ID 8.

I'd like the possibility to have the terminal ID the first one available (in the above case, it would be 2). Especially useful in the situation where e.g. terminal with ID 2 is closed (because it crashed), and I do a :Tnew to "reset it". I often do :2Topen<CR> to open it, and currently (since it is closed) I get a new terminal instance which I don't want to use. That gives mental overhead, because every time I do this reset, I have to memorize which ID I will have to do the command :<id>Topen on.

Two solutions:

  1. Have an option on how the job id is calculated; highest existing ID + 1 (the current default), or first available ID (so similar to what was done in With g:neoterm_keep_term_open=0 or Tclose!, the buffer IDs keep incrementing upwards #275 )
  2. A "change ID" command, that let's me change the ID of a terminal to something else (e.g. :Tswap 8 2 to change terminal with ID 8 to ID 2.)
@kassio kassio closed this as completed in b25fe21 Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant