Skip to content

Commit

Permalink
Add key-binding configuration README
Browse files Browse the repository at this point in the history
  • Loading branch information
mkchoi212 committed May 27, 2018
1 parent 48b1230 commit c335ee8
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ q | Ctrl+c - [q]uit
[w,a,s,d,?] >> [INPUT HERE]
```

> The movement controls have been derived from both the world of gamers (WASD) and VIM users (HJKL).
### ⚙️ Customization

The above key-bindings can be altered by creating a `.fac.yml` file in your home directory.
Please refer to the [configuration README.md](./key/README.md) for more information.

## ✋ Contributing

Expand Down
46 changes: 46 additions & 0 deletions key/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# ⚙️ Configuration

## .fac.yml

Configure fac by adding a `.fac.yml` in your `$HOME` directory. With the file in place, the following paramters can be configued:

```yml
select_local: a
select_incoming: b
toggle_view: c
show_up: d
show_down: e
scroll_up: f
scroll_down: g
edit: h
next: i
previous: j
quit: k
help: l
```
## 📖 Rules
When parsing `.fac.yml`, fac enforces *three rules.*

### 1. Invalid key-binding keys
```yml
foobar: f
```

> Warning: Invalid key: "fobar" will be ignored

### 2. Multi-character key-mappings
```yml
select_local: local
```

> Warning: Illegal multi-character mapping: "local" will be interpreted as 'l'

### 3. Duplicate key-mappings
```yml
show_up: u
scroll_up: u
```

> Fatal: Duplicate key-mapping: "scroll_up, show_up" are all represented by 'u'

0 comments on commit c335ee8

Please sign in to comment.