From 3fd48c0e3be63ed39a2e205f669d96430e7f7527 Mon Sep 17 00:00:00 2001 From: Szymon P Date: Mon, 27 Apr 2026 12:12:11 +0200 Subject: [PATCH] feat: add remap for quickly compiling and running current cpp file --- modules/cli/nixvim.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/cli/nixvim.nix b/modules/cli/nixvim.nix index f189eae..88ef3c4 100644 --- a/modules/cli/nixvim.nix +++ b/modules/cli/nixvim.nix @@ -124,6 +124,15 @@ key = "}}"; action = "}}zz"; } + { + mode = "n"; + key = "cr"; + action = ":w:TermExec cmd='mkdir -p ./out && g++ \"%\" -o \"./out/%:r\" && ./out/\"%:r\"'"; + options = { + desc = "Compile and run current cpp file"; + silent = true; + }; + } ]; autoGroups = { @@ -252,6 +261,8 @@ settings.draw.delay = 0; }; + toggleterm.enable = true; + cmp = { enable = true; settings = {