Move vim into the common module
This commit is contained in:
parent
6c8f124ba3
commit
af13d6199b
|
@ -30,6 +30,38 @@
|
|||
};
|
||||
enable = true;
|
||||
};
|
||||
vim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
expandtab = true;
|
||||
tabstop = 4;
|
||||
shiftwidth = 4;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
};
|
||||
extraConfig = ''
|
||||
autocmd BufWritePre * :%s/\s\+$//e
|
||||
if has("autocmd")
|
||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||
endif
|
||||
|
||||
set cursorline " highlight the current line
|
||||
set wildmenu " visual autocomplete for command menu
|
||||
set background=dark " enables the dark background in themes
|
||||
set showmatch " highlight matching [{()}]
|
||||
|
||||
"Shows a red line with a width of 80 characters
|
||||
set colorcolumn=80
|
||||
"Wrap text after 80 characters
|
||||
set textwidth=80
|
||||
"Autowrap text with textwidh (t) and only insert a comment leader when pressing
|
||||
"o or O (o)
|
||||
set formatoptions=to
|
||||
set encoding=utf-8
|
||||
highlight BadWhitespace ctermbg=red guibg=darkred
|
||||
au BufRead,BufNewFile * match BadWhitespace /\s\+$/
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
{
|
||||
imports = [
|
||||
"${inputs.self}/home-manager/modules"
|
||||
"${inputs.self}/home-manager/software/vim"
|
||||
"${inputs.self}/home-manager/software/work-desktop"
|
||||
"${inputs.self}/home-manager/software/yt-dlp"
|
||||
];
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
{
|
||||
imports = [
|
||||
"${inputs.self}/home-manager/modules"
|
||||
"${inputs.self}/home-manager/software/vim"
|
||||
];
|
||||
|
||||
home.username = nixosConfig.az-username;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
{
|
||||
imports = [
|
||||
"${inputs.self}/home-manager/modules"
|
||||
"${inputs.self}/home-manager/software/vim"
|
||||
];
|
||||
|
||||
home.username = nixosConfig.az-username;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
{
|
||||
imports = [
|
||||
"${inputs.self}/home-manager/modules"
|
||||
"${inputs.self}/home-manager/software/vim"
|
||||
];
|
||||
|
||||
programs.direnv = {
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
expandtab = true;
|
||||
tabstop = 4;
|
||||
shiftwidth = 4;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
};
|
||||
extraConfig = ''
|
||||
autocmd BufWritePre * :%s/\s\+$//e
|
||||
if has("autocmd")
|
||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||
endif
|
||||
|
||||
set cursorline " highlight the current line
|
||||
set wildmenu " visual autocomplete for command menu
|
||||
set background=dark " enables the dark background in themes
|
||||
set showmatch " highlight matching [{()}]
|
||||
|
||||
"Shows a red line with a width of 80 characters
|
||||
set colorcolumn=80
|
||||
"Wrap text after 80 characters
|
||||
set textwidth=80
|
||||
"Autowrap text with textwidh (t) and only insert a comment leader when pressing
|
||||
"o or O (o)
|
||||
set formatoptions=to
|
||||
set encoding=utf-8
|
||||
highlight BadWhitespace ctermbg=red guibg=darkred
|
||||
au BufRead,BufNewFile * match BadWhitespace /\s\+$/
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue