aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 8e9247460c348c453b3974a99352f636d0a5e357 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Building 
On **Linux**, use Clang.

```sh
./code/build.sh
```

On **Windows**, use MSVC.

```bat
.\code\build.bat
```

# Demo 

A "text editor".
![Watch the demo](https://github.com/lucaraymaekers/editor/blob/luca/data/showcase_editor_260404.gif)

## Key bindings
- `[ctrl]+[b]`: trigger debug break

- `[ctrl]+[p]`: split the selected panel vertically  
- `[ctrl]+[shift]+[p]`: close the selected panel

- `[ctrl]+[n]`: makes the selected panel a text panel

- `[ctrl]+[-]`: split the selected panel horizontally

- `[ctrl]+[,]`: select the next panel  
- `[ctrl]+[shift]+[,]`: select the previous panel

- `[escape]`: quit the application

### Text panel key bindings

- `[text input]`: insert a character at the cursor (replaces the selection)
- `[ctrl]+[a]`: select all text  
- `[ctrl]+[c]`: copy selection  
- `[ctrl]+[x]`: cut selection  
- `[ctrl]+[v]`: paste from the clipboard  
- `[ctrl]+[s]`: save to `./hello.c`  
- `[ctrl]+[o]`: load from `./hello.c`

- `[left]`: move cursor left  
- `[right]`: move cursor right  
- `[shift]+[left/right]`: extend the selection
- `[ctrl]+[left]`: move cursor left by word  
- `[ctrl]+[right]`: move cursor right by word
- `[up]`: move cursor up one line  
- `[down]`: move cursor down one line
- `[home]`: move to the start of the line  
- `[end]`: move to the end of the line
- `[ctrl]+[home]`: move to the start of the text  
- `[ctrl]+[end]`: move to the end of the text
- `[page up]`: move up by one page  
- `[page down]`: move down by one page

- `[enter]`: insert a newline
- `[backspace]`: delete the character before the cursor  
- `[ctrl]+[backspace]`: delete the previous word
- `[delete]`: delete the character after the cursor  
- `[ctrl]+[delete]`: delete the next word