From b0e0d7ceaf14f4eae33afaf9e7766c9d5a3c3dd7 Mon Sep 17 00:00:00 2001 From: Pavel Lutskov Date: Sat, 4 Jul 2020 10:55:30 +0200 Subject: [PATCH] C: kickass x build+run command --- ftplugin/c.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftplugin/c.vim b/ftplugin/c.vim index ccc0a43..5311f7b 100644 --- a/ftplugin/c.vim +++ b/ftplugin/c.vim @@ -4,6 +4,6 @@ cabbrev Help term ++close man nnoremap fb ][% nnoremap fe ][ nnoremap h :term ++rows=15 ++close man 3 -nnoremap x :term ++rows=15 %:p:h/run +nnoremap x :execute 'term ++rows=15 bash -c "if [ -r ./run ]; then ./run; else ninja -C build && ./build/\"$(basename \"$PWD\")\"; fi"' setlocal foldmethod=syntax foldlevel=99