From 2f54f6e9668564e5ad60d9a10fe17b5400527b09 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 21 Jan 2026 12:54:02 +0100 Subject: [PATCH] feat(nix): enable Vim with custom configuration - Enabled Vim in `default.nix` and added custom configuration under `programs.vim`. - Includes settings for indentation, syntax highlighting, secure mode, and automatic cursor position restoration. - Improves default usability and aligns with user preferences for Vim. --- modules/home/cli-apps/home-manager/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/home/cli-apps/home-manager/default.nix b/modules/home/cli-apps/home-manager/default.nix index f8bd9a9..3cbb5c1 100644 --- a/modules/home/cli-apps/home-manager/default.nix +++ b/modules/home/cli-apps/home-manager/default.nix @@ -27,6 +27,22 @@ in man = "${pkgs.bat-extras.batman}/bin/batman"; }; - home.packages = with pkgs; [ vim ]; + programs.vim = { + enable = true; + extraConfig = '' + filetype indent off + set ts=4 sw=4 et sts=4 + let spec_chglog_format = "%a %b %d %Y Harald Hoyer " + set exrc + set secure + syntax on + + " Restore cursor to last edit position + autocmd BufReadPost * + \ if line("'\"") >= 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + ''; + }; }; }