Skip to content

Commit 19f9b3d

Browse files
committed
Move README to markdown
1 parent 33a5b27 commit 19f9b3d

File tree

2 files changed

+216
-196
lines changed

2 files changed

+216
-196
lines changed

README.md

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
# Emacs Monkeytype
2+
3+
A typing game/tutor inspired by the open source and community driven [monkeytype.com](https://monkeytype.com) but for Emacs.
4+
5+
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
6+
**Table of Contents**
7+
8+
- [Emacs Monkeytype](#emacs-monkeytype)
9+
- [Usage](#usage)
10+
- [Features](#features)
11+
- [To come... (PRs welcome)](#to-come-prs-welcome)
12+
- [Tips](#tips)
13+
- [Commands / Key bindings](#commands--key-bindings)
14+
- [Customisation](#customisation)
15+
- [Log](#log)
16+
- [Install](#install)
17+
- [Changelog](#changelog)
18+
- [0.1.2](#012)
19+
- [0.1.1](#011)
20+
- [0.1.0](#010)
21+
- [License](#license)
22+
23+
<!-- markdown-toc end -->
24+
25+
## Usage
26+
27+
Use one of the functions to enter `monkeytype` mode (`monkeytype-region`, `monkeytype-buffer`, etc... see [Commands](#commands--key-bindings) section below).
28+
29+
(Note: You should bind these functions to anything you want in your `.emacs`.)
30+
31+
The buffer should look as follows:
32+
33+
![img](https://github.com/jpablobr/emacs-monkeytype/raw/main/img/monkeytype-paused.png)
34+
35+
The section inside the red rectangle is Monkeytype's mode-line and the following is the fields breakdown:
36+
37+
**MT[WPM/GWP Accuracy Elapsed-time (words/corrections/errors)]**
38+
39+
Then you can either type all the way to the end or stop/finish (`C-c C-C s` / `monkeytype-stop`).
40+
41+
The buffer should look as follows:
42+
43+
![img](https://github.com/jpablobr/emacs-monkeytype/raw/main/img/monkeytype-results-without-log.png)
44+
45+
This Results buffer re-renders the typed text highlighting errors and either correct or incorrect corrections
46+
(highlighted with a different background and slightly different colour).
47+
48+
At this point you can either practice mistyped words with `monkeytype-mistyped-words` or just troubling/hard transitions with `monkeytype--hard-transition` (`C-c C-c h`).
49+
50+
## Features
51+
52+
- Type any text you want.
53+
- Practice mistyped words.
54+
- UI customisation.
55+
- Mode-line live WPM (`monkeytype-mode-line-interval-update` adjust the update frequency).
56+
- Visual representation of typed text including errors and retries/corrections.
57+
- Auto stop after 5 seconds of no input (`C-c C-c r` [ `monkeytype-resume` ] resumes).
58+
- Optionally randomise practice words/transitions (see: `monkeytype-randomize`).
59+
- Optionally downcase practice words/transitions (see: `monkeytype-downcase`).
60+
- Optionally treat newlines as whitespace (see: `monkeytype-treat-newline-as-space`).
61+
- Optionally auto-fill text to the defaults `fill-column` value (see: `monkeytype-auto-fill`).
62+
- Select a region of text and treat it as words for practice (e.i., optionally downcased, randomised, etc... see: `monkeytype-region-as-words`).
63+
- After a test, practice troubling/hard key combinations/transitions (useful when practising with different keyboard layouts).
64+
- Mistyped words or hard transitions can be saved to `~/.monkeype/{words or transitions}` (see: `monkeytype-directory` `monkeytype-save-mistyped-words` `monkeytype-save-hard-transitions`).
65+
- Saved mistyped/transitions files (or any file but defaults to `~/.monkeytype/` dir) can be loaded with `monkeytyped-load-words-from-file`.
66+
- `monkeytype-word-regexp` customises the regexp used for removing characters from words (defaults to: ;:.\`",()-?!).
67+
68+
### To come... (PRs welcome)
69+
70+
- Save results / history
71+
72+
### Tips
73+
74+
- When using `evil-mode` it's useful to automatically enable `evil-insert` (to start typing right away).
75+
- When using `evil-escape`, `evil-escape-mode` has to be disabled in order to prevent double keystrokes getting registered.
76+
- Installing [`centered-cursor-mode`](https://github.com/emacsmirror/centered-cursor-mode) is useful for auto scrolling/paging in multi-page / long texts.
77+
78+
This can then be enabled in your `.emacs` with:
79+
80+
``` emacs-lisp
81+
(add-hook 'monkeytype-mode-hook
82+
(lambda ()
83+
(centered-cursor-mode)
84+
(evil-escape-mode -1)
85+
(evil-insert -1)))
86+
```
87+
88+
## Commands / Key bindings
89+
90+
| Key binding | Function |
91+
| ----------- | -------- |
92+
| C-c C-c f | monkeytype-fortune |
93+
| C-c C-c p | monkeytype-pause |
94+
| C-c C-c r | monkeytype-resume |
95+
| C-c C-c s | monkeytype-stop |
96+
| C-c C-c t | monkeytype-repeat |
97+
| C-c C-c m | monkeytype-mistyped-words |
98+
| C-c C-c h | monkeytype-hard-transitions |
99+
| C-c C-c a | monkeytype-save-mistyped-words |
100+
| C-c C-c o | monkeytype-save-hard-transitions |
101+
| | monkeytype-region |
102+
| | monkeytype-buffer |
103+
| | monkeytype-region-as-words |
104+
| | monkeytype-load-words-from-file |
105+
106+
## Customisation
107+
108+
Run `M-x customize-group RET` `monkeytype RET` or `monkeytype-faces RET`.
109+
110+
Or set the variables in your `.emacs` file:
111+
112+
``` emacs-lisp
113+
(setq monkeytype-face-default '(:family "Menlo" :height 1.6 :foreground "#969896"))
114+
(setq monkeytype-face-correct '(:foreground "#98be65"))
115+
(setq monkeytype-face-error '(:foreground "#ff6c6b"))
116+
(setq monkeytype-face-correction-error '(:inherit region :foreground "#ff6c6b"))
117+
(setq monkeytype-face-correction-correct '(:inherit region :foreground "#98be65"))
118+
(setq monkeytype-face-header-1 '(:foreground "#B7950B"))
119+
(setq monkeytype-face-header-2 '(:foreground "#F1C40F"))
120+
(setq monkeytype-face-header-3 '(:foreground "#F1C40F"))
121+
(setq monkeytype-mode-line-interval-update 10)
122+
(setq monkeytype-treat-newline-as-space t)
123+
(setq monkeytype-minimum-transitions 50)
124+
(setq monkeytype-insert-log nil)
125+
(setq monkeytype-directory "~/.monkeytype")
126+
(setq monkeytype-randomize t)
127+
(setq monkeytype-dowcase t)
128+
(setq monkeytype-word-regexp (concat
129+
":\\|"
130+
";\\|"
131+
",\\|"
132+
"(\\|"
133+
")\\|"
134+
"?\\|"
135+
"!\\|"
136+
" \\|"
137+
"\"\\|"
138+
"\n\\|"
139+
"\`\\|"
140+
"\\."))
141+
```
142+
143+
## Log
144+
145+
Logging can be enabled for debugging purposes (see `monkeytype-insert-log` customisation).
146+
147+
When enabled it should look as follows:
148+
149+
![img](img/monkeytype-log.png)
150+
151+
## Install
152+
153+
Just drop `monkeytype.el` somewhere in your `load-path` and add it to your `.emacs`:
154+
155+
``` emacs-lisp
156+
(add-to-list 'load-path "~/emacs.d/vendor")
157+
(require 'monkeytype)
158+
```
159+
160+
## Changelog
161+
162+
### 0.1.2
163+
164+
**Additions**
165+
166+
- `monkeytype-load-words-from-file`
167+
- `monkeytype-region-as-words`
168+
- Toggable option `monkeytype-downcase`
169+
- Toggable option `monkeytype-randomize`
170+
- `monkeytype-word-regexp`
171+
172+
**Changes**
173+
174+
- Rename option `monkeytype-downcase-mistype` to `monkeytype-downcase`
175+
- Removed `async` lib
176+
177+
**Internal**
178+
179+
- Input processing logic rewrite
180+
- Several renames and code reorganisation
181+
182+
**Fixes**
183+
184+
- Skipped text getting counters out of sync
185+
- `evil-escape` double registering characters
186+
187+
### 0.1.1
188+
189+
**Additions**
190+
191+
- Allow to practice mistyped words.
192+
- Allow to practice hard to type transitions.
193+
- Allow to save mistyped words or transitions to `~/.monkeytype` directory.
194+
- Option to auto-fill typing region.
195+
196+
**Changes**
197+
198+
- Change `monkeytype--mode-line-update-seconds` option to `monkeytype-mode-line>interval-update` to have it work with typed entries (keystrokes) defaulting to 1 (update on each keystroke).
199+
200+
**Internal**
201+
202+
- Removed `ht` library requirement.
203+
- Updated Emacs requirement to 25.1.
204+
- Misc layout improvements.
205+
206+
**Fixes**
207+
208+
- Have `local-idle-timer` stop on paused or finished status.
209+
210+
### 0.1.0
211+
212+
Initial release.
213+
214+
## License
215+
216+
GPLv3

0 commit comments

Comments
 (0)