How can I map a sequence in vim
conditionally to run any of two external programs in such way that the screen is not cleared to show the else
clause?
For example:
:nmap <c-l> :if filereadable('Makefile')<CR>!make<CR>else<CR>!ls<CR>endif<CR>
ctrl
+m
executes make
but then clears the screen and prints the following at the bottom of it:
: else
: !ls
: endif
Press ENTER or type command to continue