Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to show the output of last command in vim?

Tags:

vim

When I run a shell command it asks to type ENTER at the end and once you do the output is hidden. Is there a way to see it again w/o running the command again?

Also some internal commands like make also run external commands, and those do not even stop for ENTER so if I have an error in my 'compiler' settings the command flashes on the screen too fast to see it. How do I see the command and its output? (quickfix is empty)

UPDATE

The output is DEFINITELY still there. at least on the terminal vim. if I type

:!cat 

the output of the previous command is still there. the problem is a) it seems too much like a hack, I'm looking for a proper vim way b) it doesn't work in gui vim

like image 241
Vitaly Kushner Avatar asked Apr 17 '11 14:04

Vitaly Kushner


People also ask

What is the output of last command?

The last command in Linux is used to display the list of all the users logged in and out since the file /var/log/wtmp was created. One or more usernames can be given as an argument to display their login in (and out) time and their host-name.

How do I find Vim command history?

To search the specific previous command in the command line prompt, use : and your search key. For example; type :p and then press the upper arrow key. It will search the command that starts with p and display those commands for you. You can scroll through the history by using up and down arrow keys.

How do I use last command in Vim?

vim Normal mode commands (Editing) Repeat the Last Change Your cursor will be at position 1 of line 1, and all you need to do to fix the next two lines is press j. twice - that is, j to move down a line and . to repeat the last change, which was the addition of the I .

Does vim do previous commands?

Entering colon : then ctrl+p shows your previous command, i.e., moving backward through your vim command history. ctrl+n moves forward. This is very convenient if you're used to using the command line and prefer not to change your keyboard hand positioning to use arrow keys.


1 Answers

just type :! or you could try SingleCompile

like image 89
user1703082 Avatar answered Oct 19 '22 03:10

user1703082