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.
This commit is contained in:
parent
fce17e443e
commit
2f54f6e966
1 changed files with 17 additions and 1 deletions
|
|
@ -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 <harald@hoyer.xyz>"
|
||||
set exrc
|
||||
set secure
|
||||
syntax on
|
||||
|
||||
" Restore cursor to last edit position
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") >= 1 && line("'\"") <= line("$") |
|
||||
\ exe "normal! g`\"" |
|
||||
\ endif
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue