how can i open a terminal in the new tab in neovim with only one command?

This is :tab command. So one can do :tab term and no worries.

Please, when you feel you miss some bit of Vim, don’t hesitate to search through builtin help first. In particular, :h :tabnew and :h :tab topics stay very close to each other, residing within the same help file. As it contains more topics and advices on the subject, you may want to display it by typing :h tabpage and read it from the start till the end.

Upd.: If we talk about Neovim specifically (please, note that as long as your question only has “Vim” tag everyone assumes it’s NOT Neovim specific), then one should remember that in Neovim :term command always reuses the current buffer. Currently this is considered as a feature, not a bug.

Hence for Neovim we may want to have (at least) two commands: one to create a new empty buffer, and another one to re-use it for terminal. How you prefer this, it’s fully upon you. :tabnew | term, or :tabnew +term, or :tabnew term://sh and so on.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top