6

I often find myself

  1. Opening a terminal
  2. Running vim
  3. Starting a :terminal

Is there a way to say vim --start-terminal and have Vim automatically run :terminal ++curwin as soon as it starts?

1
  • 1
    Run a terminal emulator within vim? ISTM that vi is turning into emacs!
    – RonJohn
    Commented Sep 29, 2019 at 10:49

1 Answer 1

9

I assume you aren't literally asking for a --start-terminal flag :) ...but you can specify a command for Vim to run after it starts up using the -c flag.

So this should be as easy as

vim -c ':term ++curwin'

When I run it I am indeed in a terminal window on the shell command line and it's the only window open. Hopefully that covers what you're asking for.

1
  • Ha, no I'm not literally asking for --start-terminal. It was just to try to convey the idea. Thanks!
    – 425nesp
    Commented Sep 29, 2019 at 1:26

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.