7

When I type :terminal to vim8.1, it splits the window and I use it split window. I want to open a new buffer and open the terminal inside it. Basically, like neovim's terminal emulator. Is there a way to do like this?

6
  • 3
    Please read the documentation for the :terminal command Aug 30, 2018 at 17:39
  • 1
    It is a new buffer...
    – D. Ben Knoble
    Aug 31, 2018 at 1:50
  • 1
    @ChristianBrabandt Replying with "Please read the docs" and "Is such and such too simple" is condescending. Please help without making others feel belittled, and include full answers rather than telling people to read the manual.
    – apostl3pol
    Nov 14, 2021 at 0:11
  • @apostl3pol look, in the spirit of teach men how to fish I am merely pointing out where to find the documentation about the :term command. It's not only about this option, but other related options you might want to consider if you want to know what :term. Nov 15, 2021 at 8:24
  • @ChristianBrabandt Of course. A good approach is to link to the doc, but also include an example. Vim has great documentation, but it doesn’t have the searchability that Stackexchange does.
    – apostl3pol
    Nov 16, 2021 at 22:32

2 Answers 2

14

Thanks to Christian Brabandt, :ter ++curwin was the thing that I want.

0

I think you can use call term_open() instead. if you want to open shell in current win, it is:

call term_start($SHELL, {'curwin' : 1})

BTW, if you think this command is too long, you can create custom command:

command! Terminal call term_start($SHELL, {'curwin' : 1)
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.