2016-10-22 23:56:07 +00:00
|
|
|
Environment for learning programming using Mu: http://akkartik.name/post/mu
|
2015-09-06 23:52:48 +00:00
|
|
|
|
2016-10-22 23:56:07 +00:00
|
|
|
Run it from the `mu` directory:
|
2015-09-06 23:52:48 +00:00
|
|
|
|
|
|
|
```shell
|
|
|
|
$ ./mu edit
|
|
|
|
```
|
|
|
|
|
|
|
|
This will load all the `.mu` files in this directory and then run the editor.
|
|
|
|
Press ctrl-c to quit. Press F4 to save your work (if a lesson/ directory
|
|
|
|
exists) and to run the contents of the sandbox editor on the right.
|
|
|
|
|
|
|
|
You can also run the tests for the environment:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ ./mu test edit
|
|
|
|
```
|
|
|
|
|
2017-12-31 04:52:43 +00:00
|
|
|
You can also load the files more explicitly by enumerating them all (in order):
|
2015-09-06 23:52:48 +00:00
|
|
|
|
|
|
|
```shell
|
|
|
|
$ ./mu edit/*.mu
|
|
|
|
```
|
|
|
|
|
2017-12-31 04:52:43 +00:00
|
|
|
This is handy if you want to play with simpler versions of the editor that are
|
|
|
|
easier to understand. Stop loading at any layer to run with a subset of
|
|
|
|
features:
|
2015-09-06 23:52:48 +00:00
|
|
|
|
|
|
|
```shell
|
2017-12-31 04:52:43 +00:00
|
|
|
$ ./mu edit/001*.mu edit/002*.mu # run a simple editor rather than the full environment
|
2015-09-06 23:52:48 +00:00
|
|
|
```
|
|
|
|
|
2017-05-29 21:21:32 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
Appendix: keyboard shortcuts
|
|
|
|
|
|
|
|
_moving and scrolling_
|
|
|
|
- `ctrl-a` or `home`: move cursor to start of line
|
|
|
|
- `ctrl-e` or `end`: move cursor to end of line
|
|
|
|
- `ctrl-f` or `page-down`: scroll down by one page
|
|
|
|
- `ctrl-b` or `page-up`: scroll up by one page
|
|
|
|
- `ctrl-x`: scroll down by one line
|
|
|
|
- `ctrl-s`: scroll up by one line
|
|
|
|
- `ctrl-t`: scroll until current line is at top of screen
|
|
|
|
|
|
|
|
_modifying text_
|
|
|
|
- `ctrl-k`: delete text from cursor to end of line
|
|
|
|
- `ctrl-u`: delete text from start of line until just before cursor
|
|
|
|
- `ctrl-/`: comment/uncomment current line (using a special leader to ignore real comments https://www.reddit.com/r/vim/comments/4ootmz/_/d4ehmql)
|