# Vim -- Keeping output of last command visible

**URL:** <https://boards.straightdope.com/t/vim-keeping-output-of-last-command-visible/658301>\
**Category:** Factual Questions\
**Created:** [May 14, 2013, 8:23am UTC](https://boards.straightdope.com/t/vim-keeping-output-of-last-command-visible/658301 "2013-05-14T08:23:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [May 14, 2013, 8:23am UTC](https://boards.straightdope.com/t/vim-keeping-output-of-last-command-visible/658301/1 "2013-05-14T08:23:56Z")

</div>

I’ve been trying to use Vim, it’s nice and I’ve found an extension that allows me to use autocomplete for my chosen programming language. However, the thing that keeps me from using it is the difficulty of dealing with error dumps. Generally I’ll run something with ! and inevitably my program won’t compile, or will print out an error, or somesuch. Then when I go back to my code to fix these errors… I can’t see what was spit out anymore, making it more difficult to address problems line by line.

Is there some way I can spit the output of the last command into a small hsplit or some other visible place? I tried resorting to using gvim and switching back to the launching terminal for building/running programs, but whenever I start doing that I lapse into “might as well just use gedit if I’m gonna do that” mode.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [May 14, 2013, 4:59pm UTC](https://boards.straightdope.com/t/vim-keeping-output-of-last-command-visible/658301/2 "2013-05-14T16:59:16Z")

</div>

vim appears to support split screen options, both horizontally and vertically.

> **[Debian GNU/Linux Reference - 11.3.8 Split screen with vim](https://www.linuxtopia.org/online_books/linux_system_administration/debian_linux_guides/debian_linux_reference_guide/ch-edit.en_010.html)**
>
> Debian GNU/Linux Reference - 11.3.8 Split screen with vim

ETA: So, when you run your compile with ! you could capture the compiler error messages to a file, then view that and your source code at the same time.

---

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [May 15, 2013, 12:03am UTC](https://boards.straightdope.com/t/vim-keeping-output-of-last-command-visible/658301/3 "2013-05-15T00:03:22Z")

</div>

It does support split screen, I use it all the time. Unfortunately, redirecting the output to a file doesn’t work as well as you might hope, vi doesn’t auto-update the buffer, so you have to switch to the tab and reopen the file every time.
