From 7f149350c5eb90c3fc6cb020e3758a999a462070 Mon Sep 17 00:00:00 2001 From: Aotrix Date: Wed, 26 Feb 2025 03:12:44 +0100 Subject: added rg command to retrieve executable names from cmake build dir --- lua/aotrix/cmake_autorun.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/aotrix/cmake_autorun.lua b/lua/aotrix/cmake_autorun.lua index 9d5747e..833869c 100644 --- a/lua/aotrix/cmake_autorun.lua +++ b/lua/aotrix/cmake_autorun.lua @@ -1,3 +1,8 @@ -- use :!cmake --build PATH_TO_BUILD_FOLDER -- && Telescope to choose executable in PATH_TO_BUILD_FOLDER/EXECUTABLE_FOLDER/* --- Then launch executable in a normal terminal - not nvim one +-- Find these lines (in cmake.build) : agougou is the "bin" folder, program is the exe name +-- CMakeFiles/program.dir/build: agougou/program +-- rg 'CMakeFiles\/(.*).dir\/build:(?!.*Lib*)' build/CMakeFiles/ --no-filename -Por '$1' +vim.keymap.set("n", "mt", + "terminal cmake --build build && ./build/bin/* ", + {noremap = true, silent = true}) -- cgit v1.2.3