mirror of
https://github.com/ItsDrike/nixdots
synced 2025-06-29 15:50:43 +00:00
Full rewrite
This commit is contained in:
parent
8053e16a12
commit
8dc12c0ae7
29 changed files with 294 additions and 74 deletions
14
system/programs/default.nix
Normal file
14
system/programs/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
imports = [
|
||||
./nano.nix
|
||||
];
|
||||
|
||||
# Basic list of must-have packages for all systems
|
||||
# TODO: Move these to home-manager, no need for system wide deps
|
||||
# although maybe keep vim
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
gnupg
|
||||
delta
|
||||
];
|
||||
}
|
49
system/programs/nano.nix
Normal file
49
system/programs/nano.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.nano = {
|
||||
# enabled by default anyway, we can keep it in case my neovim config breaks
|
||||
enable = true;
|
||||
nanorc = ''
|
||||
include ${pkgs.nanorc}/share/*.nanorc # extended syntax highlighting
|
||||
|
||||
# Options
|
||||
# https://github.com/davidhcefx/Modern-Nano-Keybindings
|
||||
set tabsize 4
|
||||
set tabstospaces
|
||||
set linenumbers
|
||||
set numbercolor yellow,normal
|
||||
set indicator # side-bar for indicating cur position
|
||||
set smarthome # `Home` jumps to line start first
|
||||
set afterends # `Ctrl+Right` move to word ends instead of word starts
|
||||
set wordchars "_" # recognize '_' as part of a word
|
||||
set zap # delete selected text as a whole
|
||||
set historylog # remember search history
|
||||
set multibuffer # read files into multibuffer instead of insert
|
||||
set mouse # enable mouse support
|
||||
bind M-R redo main
|
||||
bind ^C copy main
|
||||
bind ^X cut main
|
||||
bind ^V paste main
|
||||
bind ^K zap main
|
||||
bind ^H chopwordleft all
|
||||
bind ^Q exit all
|
||||
bind ^Z suspend main
|
||||
bind M-/ comment main
|
||||
bind ^Space complete main
|
||||
|
||||
bind M-C location main
|
||||
bind ^E wherewas all
|
||||
bind M-E findprevious all
|
||||
bind ^R replace main
|
||||
bind ^B pageup all # vim-like support
|
||||
bind ^F pagedown all
|
||||
bind ^G firstline all
|
||||
bind M-G lastline all
|
||||
|
||||
bind M-1 help all # fix ^G been used
|
||||
bind Sh-M-C constantshow main # fix M-C, M-F and M-b been used
|
||||
bind Sh-M-F formatter main
|
||||
bind Sh-M-B linter main
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue