Reputation: 2094
I wrote simple mapping that compiles and run C program. It makes what I wanted, but it returns to vim immediately after program finish execution without waiting me to press Enter. How can I fix this?
map <leader>b :!clear && gcc % -o %< && ./%<<CR>
Upvotes: 1
Views: 1816
Reputation: 94453
Implement waiting in shell: add read
at the end of your command line:
clear && gcc % -o %< && ./%< && read
Upvotes: 3