Vim Make and Run

0

What would be the best way to make a hotkey that makes a project and then runs the generated binary?

vonhogen

Posted 2010-09-19T07:24:23.703

Reputation: 1 949

Answers

1

nmap key :!make && ./a.out<CR>

This just runs make and, if it succeeds, runs a.out. If your binary is not named a.out, replace a.out with the name of the generated binary.

m42a

Posted 2010-09-19T07:24:23.703

Reputation: 156