Setting default settings for vim and making the default editor globaly
This commit is contained in:
4 files changed
+28
-12
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./modules/vim.nix
|
||||
./modules/display.nix
|
||||
./modules/sound.nix
|
||||
./modules/hyprland.nix
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user