Is there a way to open the ":terminal" in the bottom pane instead of the top pane ?

346 views
Skip to first unread message

Eric Marceau

unread,
Oct 10, 2022, 5:32:39 AM10/10/22
to v...@vim.org

I would like to open the terminal in the bottom pane, rather than the top pane.

Is there an option that could be specified to allow me to control that?

Thank you,

Eric Marceau

Tony Mechelynck

unread,
Oct 10, 2022, 5:53:48 AM10/10/22
to Eric Marceau, vim...@googlegroups.com
I don't use the terminal myself, but try the documentation at :help :botright

To always open the terminal at the bottom when typed as exactly "term"
(not for example "ter" or "terminal") try (untested)

:cabbr <expr> term ((getcmdtype == ':' && getcmdpos() <= 7)? 'bot
term' : 'term')

(I use a similar but different abbreviation to open the help at the bottom.)

Best regards,
Tony.

Lifepillar

unread,
Oct 10, 2022, 12:34:23 PM10/10/22
to vim...@googlegroups.com
On 2022-10-10, Eric Marceau <eajma...@gmail.com> wrote:
> I would like to open the terminal in the bottom pane, rather than the
> top pane.
>
> Is there an option that could be specified to allow me to control that?

If you are ok with the bottom window always getting the focus on every
split (not only for terminal windows), you may just:

set splitbelow

Hope this help,
Life.

Eric Marceau

unread,
Oct 10, 2022, 8:40:55 PM10/10/22
to vim...@googlegroups.com, v...@vim.org

Thank you, Bram,

That worked perfectly! 

    (plit created and terminal opened in bottom pane)


Eric


On 2022-10-10 06:25, Bram Moolenaar wrote:

      
I would like to open the terminal in the bottom pane, rather than the 
top pane.

Is there an option that could be specified to allow me to control that?
Short answer:  :bot term

Walter Cazzola

unread,
Oct 11, 2022, 4:45:23 PM10/11/22
to vim...@googlegroups.com, v...@vim.org
Hi,
if you add in your .vimrc

:command BotTerm botright terminal

with :BotTerm you will open a terminal in the bottom of the window.

HTH

Walter
--
Reply all
Reply to author
Forward
0 new messages