This repository contains a Nix module to configure Vim, ZSH and tmux. This module is meant to be used with home-manager.
You need to have Nix and home-manager installed.
Using niv (you need to install and initialize it before):
niv add lightcode/lc-shell-nix -v v1.0.0
You can import it by adding these lines to your home.nix
:
{
imports = let
sources = import ./nix/sources.nix {};
in [
sources.lc-shell-nix.outPath
];
}
Or by fetching manually the tarball:
If you don't want to use niv
, you can add these lines to your home.nix
:
{
imports = [
(fetchTarball "https://github.com/lightcode/lc-shell-nix/archive/v1.0.0.tar.gz")
];
}
Once the module is added to your configuration, you need to enable the features you need:
{
lc-shell = {
vim.enable = true;
tmux.enable = true;
zsh.enable = true;
};
}
- CTRL + k and CTRL + p: enable/disable paste mode and hide/show line number
- , + w: write
- , + q: quit buffer
- CTRL + p: open ctrlp, an extension that allows to open files
- , + Left/Right: change buffer
- , + s: strip trailing whitespace (remove white space at the end of lines)
Note: in this context, buffers are used like tabs.
- ALT + Up/Down/Left/Right: move between panels
- ALT + PageUp/PageDown: change window
- ALT + Space: zoom a panel
- CTRL + b, PageUp: scroll the panel up. Next you can move with PageUP, PageDown and the arrows. This mode is the copy mode.
Functions:
reloadzsh
: reload.zshrc
,.zshenv
and runrehash
(that permit to recreate hash table that contains all functions in PATH. This is useful for completion)
Useful aliases:
gc
:git commit
gl
:git log
gws
:git status --short
To customize ZSH, you can add ZSH files in the ~/.zshrc.d
directory. You can still use the features provided by home-manager and Nix to override some parameters or add plugins.