9

I want to open a terminal buffer in a vertical split.

If i try :vertical split terminal I get a buffer named 'terminal', not a terminal buffer.

I recently learned I could do :vertical split +terminal to open a terminal buffer, but I have not been able to find the help docs explaining what the + is doing.

What does the '+' mean, is it specific to terminal buffers or is it a more generic thing?

P.S.

I also just realized I can do :vertical split | terminal to get the same behavior (at least I think its the same).

1 Answer 1

10

Should have looked a bit harder before asking, I found my answer:

:help +cmd

                            *+cmd* *[+cmd]*
The [+cmd] argument can be used to position the cursor in the newly opened
file, or execute any other command:
    +       Start at the last line.
    +{num}      Start at line {num}.
    +/{pat}     Start at first line containing {pat}.
    +{command}  Execute {command} after opening the new file.
                {command} is any Ex command.
1
  • These also work in the command line, e.g. type vim system.log + to open system.log and jump to the end of the file.
    – yyny
    Mar 25, 2022 at 17:41

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.