Setting default settings for vim and making the default editor globaly

This commit is contained in:
metallaxis committed 2026-11-04 11:57:12 +02:00
1 parent 82fc703411
commit b2d083d695
4 files changed
+28 -12

No files matched your search

+1
View File
@@ -2,6 +2,7 @@
{
imports = [
./modules/vim.nix
./modules/display.nix
./modules/sound.nix
./modules/hyprland.nix
-6
View File
@@ -14,12 +14,6 @@
home.homeDirectory = "/home/metallaxis";
home.stateVersion = "26.05";
# Set the default shell for the user
home.sessionVariables = {
EDITOR = "vim";
VISUAL = "vim";
};
# Set sops-age key file path
sops.age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
+27
View File
@@ -0,0 +1,27 @@
{ config, pkgs, ... }:
{
programs.vim = {
defaultEditor = true;
customRC = ''
" Enable line numbers
set number
set relativenumber
" Indentation rules
set tabstop=4
set shiftwidth=4
set expandtab
" Better searching
set hlsearch
set incsearch
set ignorecase
set smartcase
" Enable syntax highlighting and mouse support
syntax on
set mouse=a
'';
};
}
-6
View File
@@ -8,10 +8,4 @@
home.username = "root";
home.homeDirectory = "/root";
home.stateVersion = "26.05";
# Set the default shell for the user
home.sessionVariables = {
EDITOR = "vim";
VISUAL = "vim";
};
}