I like to use the vim embedded terminal, but I do not know how I could adjust its height. Sometimes, I need it to be lower so that I could concentrate on my editor how could I adjust it ?
There are several options:
(1) The simple way is to drag the bar separating the two split windows using the mouse. As far as I know this works by default, but I've only been using neovim, not standard vim so you may need to enable the mouse first.
(2) In normal mode, type
10<C-W>+ to increase the size of the current split by 10 lines. Or make a binding for this, e.g.
nmap <Leader>b 10<C-W>+<CR> (b for bigger; Leader is
\ by default but should be rebound to space in my opinion)
(3) A more automatic solution to the problem of the current split being too small is to add this to your vimrc:
This will make the currently active window 38 lines tall, with the terminal filling the remaining space. But when you switch to the terminal, this is swapped around so that you can see the command output better.
To open a terminal for running
command with height 20 you can do
:new +resize20 term://command
If the terminal is ready created, you either use
:resize 20 or
20<c-w>_ for height.
:vertical resize 20 or
20<c-w>| for width.