<span style="background:white;color:black;">^G</span> Get Help <span style="background:white;color:black;">^O</span> Write Out <span style="background:white;color:black;">^W</span> Where Is <span style="background:white;color:black;">^K</span> Cut Text <span style="background:white;color:black;">^J</span> Justify <span style="background:white;color:black;">^C</span> Cur Pos
<span style="background:white;color:black;">^X</span> Exit <span style="background:white;color:black;">^R</span> Read File <span style="background:white;color:black;">^\</span> Replace <span style="background:white;color:black;">^U</span> Uncut Text<span style="background:white;color:black;">^T</span> To Spell <span style="background:white;color:black;">^_</span> Go To Line
```
---
# `nano`
`nano` is a small and simple editor which shows its commands at most times at the bottom (reminder, `^` means `Ctrl`):
```
<span style="background:white;color:black;">^G</span> Get Help <span style="background:white;color:black;">^O</span> Write Out <span style="background:white;color:black;">^W</span> Where Is <span style="background:white;color:black;">^K</span> Cut Text <span style="background:white;color:black;">^J</span> Justify <span style="background:white;color:black;">^C</span> Cur Pos
<span style="background:white;color:black;">^X</span> Exit <span style="background:white;color:black;">^R</span> Read File <span style="background:white;color:black;">^\</span> Replace <span style="background:white;color:black;">^U</span> Uncut Text<span style="background:white;color:black;">^T</span> To Spell <span style="background:white;color:black;">^_</span> Go To Line
```
You can use arrow keys to move around, input text as normal from where the cursor is.
Key commands:
* `Ctrl` + `W` ".highlight[w]here is" for searching the file
* `Ctrl` + `O` "write .highlight[o]ut" to save changes
* `Ctrl` + `X` "e.highlight[x]it" to get back to the shell
---
# Try `nano`
.exercise[
1. Open a new file, `ten`, with `nano`:
```
user@remote:~/scits-training/numbers/ $ nano ten
```
2. Add numbers from 1 to 5 to it, on separate lines
3. Save and exit `nano`
4. Verify what's in the file using `cat`
]
---
# `vim`
```
user@remote:~/scits-training/numbers/ $ vim hundred
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"hundred" 100L, 292C 1,1 Top
```
---
# `vim`
`vim` (or, technically, "Vi IMproved") is one of two "Swiss knife" editors that
most Linux professionals prefer to use (the other one being `emacs`).
`vim` is available almost everywhere, and with proper configuration can do
very sophisticated things.
With power comes complexity, but for basic editing one doesn't have to remember a lot.