From bbfe9a3f8458e63a6b453f4fce27cdcfc004e618 Mon Sep 17 00:00:00 2001 From: Ethan Girouard Date: Fri, 19 Sep 2025 14:16:03 -0400 Subject: [PATCH] Fix typing "#" moving to start of line --- config.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/config.nix b/config.nix index 56a0ec4..3f6f98b 100644 --- a/config.nix +++ b/config.nix @@ -18,6 +18,10 @@ cindent = true; + # Same as default, but without "0#,", which prevents typing "#" + # from going to the start of the line + cinkeys = "0{,0},0),0],:,!^F,o,O,e"; + signcolumn = "yes"; }; @@ -199,6 +203,23 @@ poppler-utils # (pdfinfo) ]; + autoCmd = [ + { + # Reset cinkeys when editing c/c++ files + command = "setlocal cinkeys&"; + pattern = [ + "*.c" + "*.h" + "*.cpp" + "*.hpp" + ]; + event = [ + "BufEnter" + "BufWinEnter" + ]; + } + ]; + keymaps = [ { action = "Dashboard";