Wiki

by yszheda

View project onGitHub

Tip 104: Compile Code Without Leaving Vim

Return to the top: <<Practical Vim>>

References:

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h quickfix

Don't Lose the Place

When we run the :make command, Vim automatically jumps to the first error (unless there are none). If we prefer that our cursor remain where it is, we can instead run this:

:make!

The trailing ! character tells Vim to update the quickfix list without jumping to the first item.