Skip to content

Commit 91f2b5a

Browse files
committed
Update README
1 parent 238b631 commit 91f2b5a

File tree

1 file changed

+54
-8
lines changed

1 file changed

+54
-8
lines changed

README.md

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# lc-shell for Nix
22

3-
This repository contains the Nix version of my Vim/ZSH/Tmux configuration called [lc-shell](https://github.com/lightcode/lc-shell). This configuration is a module for [home-manager](https://github.com/nix-community/home-manager).
3+
This repository contains a Nix module to configure Vim, ZSH and tmux. This module is meant to be used with [home-manager](https://github.com/nix-community/home-manager).
44

55

6-
## Usage
6+
## Installation
7+
8+
### Prerequisites
9+
10+
You need to have Nix and home-manager installed.
711

812
### Include the module
913

@@ -13,7 +17,7 @@ This repository contains the Nix version of my Vim/ZSH/Tmux configuration called
1317
niv add lightcode/lc-shell-nix -v v1.0.0
1418
```
1519

16-
Then, you can import the module like this:
20+
You can import it by adding these lines to your `home.nix`:
1721

1822
```nix
1923
{
@@ -22,13 +26,13 @@ Then, you can import the module like this:
2226
in [
2327
sources.lc-shell-nix.outPath
2428
];
25-
26-
# ...
2729
}
2830
```
2931

3032
**Or by fetching manually the tarball**:
3133

34+
If you don't want to use `niv`, you can add these lines to your `home.nix`:
35+
3236
```nix
3337
{
3438
imports = [
@@ -39,16 +43,58 @@ Then, you can import the module like this:
3943

4044
### Enable the module
4145

42-
In your home-manager configuration, you need to enable the features you need:
46+
Once the module is added to your configuration, you need to enable the features you need:
4347

4448
```nix
4549
{
46-
4750
lc-shell = {
4851
vim.enable = true;
4952
tmux.enable = true;
5053
zsh.enable = true;
5154
};
52-
5355
}
5456
```
57+
58+
59+
## What lc-shell-nix can do?
60+
61+
### Vim
62+
63+
* <kbd>CTRL</kbd> + <kbd>k</kbd> and <kbd>CTRL</kbd> + <kbd>p</kbd>: enable/disable paste mode and hide/show line number
64+
* <kbd>,</kbd> + <kbd>w</kbd>: write
65+
* <kbd>,</kbd> + <kbd>q</kbd>: quit buffer
66+
* <kbd>CTRL</kbd> + <kbd>p</kbd>: open ctrlp, an extension that allow to open files
67+
* <kbd>,</kbd> + <kbd>Left</kbd>/<kbd>Right</kbd>: change buffer
68+
* <kbd>,</kbd> + <kbd>s</kbd>: strip trailing whitespace (remove white space at the end of lines)
69+
70+
**Note**: in this context, buffers are used like tabs.
71+
72+
73+
### Tmux
74+
75+
* <kbd>ALT</kbd> + <kbd>Up</kbd>/<kbd>Down</kbd>/<kbd>Left</kbd>/<kbd>Right</kbd>: move between panels
76+
* <kbd>ALT</kbd> + <kbd>PageUp</kbd>/<kbd>PageDown</kbd>: change window
77+
* <kbd>ALT</kbd> + <kbd>Space</kbd>: zoom a panel
78+
* <kbd>CTRL</kbd> + <kbd>b</kbd>, <kbd>PageUp</kbd>: scroll the pannel up. Next you can move with <kbd>PageUP</kbd>,
79+
<kbd>PageDown</kbd> and the arrows. This mode is the copy mode.
80+
81+
82+
### ZSH
83+
84+
Functions:
85+
86+
* `reloadzsh`: reload `.zshrc`, `.zshenv` and run `rehash` (that permit to recreate hash table that contains all functions in PATH. This is usefull for completion)
87+
88+
Shortcuts:
89+
90+
* <kbd>ALT</kbd> + <kbd>g</kbd>: `git status --short`
91+
92+
Usefull aliases:
93+
94+
* `gl`: `git log`
95+
* `gc`: `git commit`
96+
97+
98+
### ZSH customizations
99+
100+
To customize ZSH, you can add ZSH files in the `~/.zshrc.d` directory. You can still used the features provided by home-manager and Nix to override some parameters or add plugins.

0 commit comments

Comments
 (0)