mirror of
https://github.com/js0ny/dotfiles.git
synced 2026-03-23 19:22:43 +00:00
use zsh
This commit is contained in:
parent
cd9c91b9bc
commit
fbe299a28c
16 changed files with 67 additions and 17 deletions
|
|
@ -1,12 +1,47 @@
|
|||
{config, pkgs, ...}: let
|
||||
aliases = import ./aliases.nix { pkgs = pkgs; };
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
aliases = import ./aliases.nix {pkgs = pkgs;};
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
zsh-fzf-tab
|
||||
];
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
historySubstringSearch.enable = true;
|
||||
enableCompletion = true;
|
||||
dotDir = "${config.xdg.configHome}/zsh";
|
||||
shellAliases = aliases;
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
patterns = {
|
||||
"rm -rf *" = "fg=blue,bold,bg=red";
|
||||
};
|
||||
highlighters = [
|
||||
"main"
|
||||
"pattern"
|
||||
"brackets"
|
||||
"root"
|
||||
];
|
||||
};
|
||||
initContent = ''
|
||||
# Emacs Hybrid
|
||||
bindkey '^A' beginning-of-line
|
||||
bindkey '^E' end-of-line
|
||||
bindkey '^F' forward-char
|
||||
bindkey '^B' backward-char
|
||||
bindkey '^P' up-line-or-history
|
||||
bindkey '^N' down-line-or-history
|
||||
# bindkey '^R' history-incremental-search-backward # Use fzf
|
||||
bindkey '^K' kill-line
|
||||
|
||||
bindkey -M viins '^?' backward-delete-char
|
||||
bindkey -M viins '^H' backward-kill-word
|
||||
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
|
||||
'';
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue