Opening terminals in a predefined order / position based on my personal preference.
Call setup with optional settings:
require("terminal").setup({
size = 20, -- height in rows of the bottom terminal split (default 20)
})Focuses the rightmost terminal. If no terminal exists it opens a new one in a bottom split. The terminal will be automatically set to insert mode.
Opens a new terminal to the right of the last one. If no terminal exists it opens one in a bottom split.
The working directory is determined by the currently open file. If no file is open or the current buffer is a terminal the terminal will be opened in the current working directory.
A custom directory can be passed as argument.
