1<!doctype html>
2<html lang="en">
3<head>
4<meta charset="utf-8">
5<meta name="viewport" content="width=device-width, initial-scale=1">
6<meta name="color-scheme" content="light dark">
7<title>docs/guide.md · files · example.test</title>
8<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff">
9<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0c0c0c">
10<meta name="apple-mobile-web-app-title" content="ermite">
11<link rel="icon" type="image/svg+xml" href="/-/static/img/icon.HASH.svg">
12<link rel="apple-touch-icon" href="/-/static/app/apple-touch-icon.HASH.png">
13<link rel="manifest" href="/-/static/app/manifest.HASH.webmanifest">
14<link rel="preload" href="/-/static/fonts/atkinson-next.HASH.woff2" as="font" type="font/woff2" crossorigin>
15<link rel="stylesheet" href="/-/static/css/ermite.HASH.css">
16<meta name="htmx-config" content='{"history":false,"includeIndicatorCSS":false,"extensions":"sse, hx-live"}'>
17<script src="/-/static/js/htmx.min.HASH.js" defer>
18</script>
19<script src="/-/static/js/hx-live.min.HASH.js" defer>
20</script>
21<script src="/-/static/js/hx-sse.min.HASH.js" defer>
22</script>
23<script src="/-/static/js/ermite.HASH.js" defer>
24</script>
25<script src="/-/static/js/files.HASH.js" defer>
26</script>
27<script src="/-/static/js/passkey.HASH.js" defer>
28</script>
29<script src="/-/static/js/log.HASH.js" defer>
30</script>
31</head>
32<body data-ref="main" data-sha="SHA40" data-sel="" data-nav="" data-paths="/files/paths/SHA40" data-blob="/files/blob/main">
33<a class="skip" href="#main">skip to content</a>
34<header class="hdr">
35<div class="hdr-top">
36<a class="brand" href="/" data-g="h" aria-label="home" title="home (g h)">
37<span class="brand-mark" aria-hidden="true">
38</span>
39</a>
40<nav class="crumbs" aria-label="Path">
41<ol>
42<li>
43<a href="/files">files</a>
44</li>
45<li>
46<a href="/files/tree/main">blob</a>
47</li>
48<li>
49<a href="/files/tree/main">main</a>
50</li>
51<li>
52<a href="/files/tree/main/docs">docs</a>
53</li>
54<li>
55<a href="/files/blob/main/docs/guide.md" aria-current="page">guide.md</a>
56</li>
57</ol>
58</nav>
59<div class="hdr-acts">
60<a class="btn ref" href="/files/refs" data-fire="refs" aria-keyshortcuts="b" title="switch branch or tag (b)">
61<span class="ico i-branch" aria-hidden="true">
62</span>
63<span class="ref-name">main</span>
64<span class="sha">SHA7</span>
65</a>
66<button type="button" class="btn search" data-js aria-haspopup="dialog" aria-controls="panel-cmd" aria-keyshortcuts="Control+K :" title="go to a section, ref, file or repo (ctrl k or :)" data-fire="cmd">
67<span class="ico i-search" aria-hidden="true">
68</span>
69<span class="search-label">Go to…</span>
70<kbd aria-hidden="true">ctrl k</kbd>
71</button>
72<button type="button" class="btn icon" data-install hidden aria-label="Install app" title="install ermite as an app">
73<span class="ico i-download" aria-hidden="true">
74</span>
75</button>
76</div>
77</div>
78<nav class="tabs" aria-label="Sections">
79<ul>
80<li>
81<a href="/files" data-key="s" aria-keyshortcuts="s">Summary <kbd aria-hidden="true">s</kbd>
82</a>
83</li>
84<li>
85<a href="/files/tree/main" data-key="t" aria-keyshortcuts="t" aria-current="page">Files <kbd aria-hidden="true">t</kbd>
86</a>
87</li>
88<li>
89<a href="/files/commits/main" data-key="c" aria-keyshortcuts="c">Commits <kbd aria-hidden="true">c</kbd>
90</a>
91</li>
92<li>
93<a href="/files/refs" data-key="r" aria-keyshortcuts="r">Branches & tags <kbd aria-hidden="true">r</kbd>
94</a>
95</li>
96<li>
97<a href="/files/merge-requests" data-key="m" aria-keyshortcuts="m">Merge requests <kbd aria-hidden="true">m</kbd>
98</a>
99</li>
100<li>
101<a href="/files/actions" data-key="a" aria-keyshortcuts="a">Actions <kbd aria-hidden="true">a</kbd>
102</a>
103</li>
104</ul>
105</nav>
106</header>
107<div class="work has-rail">
108<main id="main" tabindex="-1">
109<h1 class="file-h">
110<span>guide.md</span>
111<span class="acts">
112<a class="btn" href="/files/raw/main/docs/guide.md">Raw</a>
113<a class="btn" href="/files/commits/main/docs/guide.md">History</a>
114<a class="btn" href="/files/tree/main/docs">Folder</a>
115</span>
116</h1>
117<article class="prose" aria-label="guide.md" hx-ignore>
118<h1 id="md-guide">Guide</h1>
119<h2 id="md-steps">Steps</h2>
120<p>Run it.</p>
121<pre>
122<code class="language-sh">make all
123</code>
124</pre>
125</article>
126<details class="source">
127<summary>source</summary>
128<pre class="chroma code" data-anchor="" hx-on:click="let a = event.target.closest('a.ln'); if (!a) return; event.preventDefault();
129 let n = +a.textContent; if (!event.shiftKey || !data.anchor) data.anchor = n;
130 let lo = Math.min(+data.anchor, n), hi = Math.max(+data.anchor, n);
131 history.replaceState(null, '', '#L' + lo + (hi > lo ? '-L' + hi : '')); trigger('sel')" hx-on:sel="let m = location.hash.match(/^#L(\d+)(?:-L(\d+))?$/); let lo = m ? +m[1] : 0, hi = m ? +(m[2] || m[1]) : 0;
132 q('.line in this').arr().forEach(l => { let k = +l.id.slice(1); l.classList.toggle('sel', k >= lo && k <= hi) });
133 document.body.dataset.sel = lo ? 'L' + lo + (hi > lo ? '-L' + hi + ' · ' + (hi - lo + 1) + ' lines' : '') : '';
134 if (lo && event.detail?.scroll) document.getElementById('L' + lo)?.scrollIntoView({ block: 'center' })" hx-live="if (!data.ready) { data.ready = '1'; trigger('sel', { scroll: true }) }" data-ready="">
135<code hx-ignore>
136<span class="line" id="L1">
137<a class="ln" href="#L1">1</a>
138<span class="gh"># Guide</span>
139</span>
140<span class="line" id="L2">
141<a class="ln" href="#L2">2</a>
142</span>
143<span class="line" id="L3">
144<a class="ln" href="#L3">3</a>
145<span class="gu">## Steps</span>
146</span>
147<span class="line" id="L4">
148<a class="ln" href="#L4">4</a>
149</span>
150<span class="line" id="L5">
151<a class="ln" href="#L5">5</a>Run it.</span>
152<span class="line" id="L6">
153<a class="ln" href="#L6">6</a>
154</span>
155<span class="line" id="L7">
156<a class="ln" href="#L7">7</a>
157<span class="s">```sh</span>
158</span>
159<span class="line" id="L8">
160<a class="ln" href="#L8">8</a>make all</span>
161<span class="line" id="L9">
162<a class="ln" href="#L9">9</a>
163<span class="s">```</span>
164</span>
165</code>
166</pre>
167</details>
168</main>
169<aside class="rail" aria-label="Context">
170<section aria-labelledby="r-file">
171<h2 id="r-file">File</h2>
172<dl class="kv">
173<dt>size</dt>
174<dd>47 B</dd>
175<dt>lines</dt>
176<dd>9</dd>
177<dt>type</dt>
178<dd>markdown</dd>
179</dl>
180</section>
181<section aria-labelledby="r-last">
182<h2 id="r-last">Last change <a href="/files/commits/main/docs/guide.md">History</a>
183</h2>
184<p>
185<a href="/files/commit/SHA40">SHA7</a> add docs/guide.md</p>
186<p class="dim">T · <time datetime="STAMP" title="STAMP">AGO</time>
187</p>
188</section>
189<section aria-labelledby="r-outline">
190<h2 id="r-outline">On this page</h2>
191<nav class="outline" aria-label="Outline">
192<a class="l1" href="#md-guide">Guide</a>
193<a class="l2" href="#md-steps">Steps</a>
194</nav>
195</section>
196<section aria-labelledby="r-sel">
197<h2 id="r-sel">Selection</h2>
198<p :text="document.body.dataset.sel || 'none · click a line number, shift-click extends'">none · click a line number, shift-click extends</p>
199<p class="dim">y copies a permalink pinned to the commit sha</p>
200</section>
201</aside>
202</div>
203<footer class="foot">
204<span>ermite devel</span>
205<a href="http://example.test/ermite" rel="noopener" title="source of this version (AGPL-3.0-or-later)">source</a>
206<button type="button" class="foot-keys" data-js data-fire="help" aria-haspopup="dialog" aria-controls="panel-help" aria-keyshortcuts="?">
207<kbd aria-hidden="true">?</kbd> keyboard shortcuts</button>
208</footer>
209<div class="hint" role="status" aria-live="polite">
210<span class="hint-nav" :text="document.body.dataset.nav || ''">
211</span>
212<span class="hint-sel" :text="document.body.dataset.sel ? document.body.dataset.sel + ' · y permalink' : ''">
213</span>
214<span class="hint-flash" :text="document.body.dataset.flash || ''">
215</span>
216</div>
217<dialog id="panel-help" class="panel modal" aria-label="Keyboard shortcuts" hx-on:keydown="event.key === 'Escape' && (event.preventDefault(), this.close())" hx-on:click="event.target === this && this.close()">
218<div class="panel-head">
219<h2>Keyboard shortcuts</h2>
220<button type="button" class="panel-x" aria-label="Close" hx-on:click="closest('dialog').close()">
221<kbd>esc</kbd> close</button>
222</div>
223<div class="keys-pref">
224<label>
225<input type="checkbox" id="keys-off" aria-describedby="keys-note" hx-on:change="ermite.setKeysOff(this.checked)"> Turn off single-key shortcuts</label>
226<p id="keys-note" class="dim">Single-key shortcuts are on. ctrl k and esc work whatever this says.</p>
227</div>
228<dl class="keys">
229<div>
230<dt>
231<kbd>ctrl k</kbd>
232<kbd>:</kbd>
233</dt>
234<dd>go to a section, branch, tag, file or repository</dd>
235</div>
236<div>
237<dt>
238<kbd>?</kbd>
239</dt>
240<dd>this list</dd>
241</div>
242<div>
243<dt>
244<kbd>j</kbd>
245<kbd>k</kbd>
246</dt>
247<dd>move the row cursor down / up</dd>
248</div>
249<div>
250<dt>
251<kbd>enter</kbd>
252</dt>
253<dd>open the row under the cursor; on Files, a directory opens or closes in place</dd>
254</div>
255<div>
256<dt>
257<kbd>↑</kbd>
258<kbd>↓</kbd>
259<kbd>←</kbd>
260<kbd>→</kbd>
261<kbd>home</kbd>
262<kbd>end</kbd>
263</dt>
264<dd>in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file</dd>
265</div>
266<div>
267<dt>
268<kbd>l</kbd>
269<kbd>h</kbd>
270</dt>
271<dd>on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls</dd>
272</div>
273<div>
274<dt>
275<kbd>g g</kbd>
276<kbd>G</kbd>
277</dt>
278<dd>first / last row</dd>
279</div>
280<div>
281<dt>
282<kbd>/</kbd>
283</dt>
284<dd>filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)</dd>
285</div>
286<div>
287<dt>
288<kbd>b</kbd>
289</dt>
290<dd>switch branch or tag</dd>
291</div>
292<div>
293<dt>
294<kbd>s</kbd>
295<kbd>t</kbd>
296<kbd>c</kbd>
297<kbd>r</kbd>
298<kbd>m</kbd>
299</dt>
300<dd>tabs: summary, files, commits, branches & tags, merge requests</dd>
301</div>
302<div>
303<dt>
304<kbd>g h</kbd>
305</dt>
306<dd>home</dd>
307</div>
308<div>
309<dt>
310<kbd>y</kbd>
311</dt>
312<dd>copy a permalink pinned to the commit</dd>
313</div>
314<div>
315<dt>
316<kbd>d</kbd>
317<kbd>u</kbd>
318<kbd>x</kbd>
319</dt>
320<dd>diff: split / unified / collapse or expand all</dd>
321</div>
322<div>
323<dt>
324<kbd>e</kbd>
325<kbd>E</kbd>
326</dt>
327<dd>diff: the whole file in view / every file, with the lines the hunks hide</dd>
328</div>
329<div>
330<dt>
331<kbd>n</kbd>
332</dt>
333<dd>merge request: next note in the diff</dd>
334</div>
335<div>
336<dt>
337<kbd>esc</kbd>
338</dt>
339<dd>close a dialog, leave a field</dd>
340</div>
341</dl>
342</dialog>
343<dialog id="panel-refs" class="panel modal" aria-label="Switch ref" hx-on:keydown="event.key === 'Escape' && (event.preventDefault(), this.close())" hx-on:click="event.target === this && this.close()">
344<div class="panel-head">
345<label for="refs-filter" class="sr">filter branches and tags</label>
346<input id="refs-filter" type="search" placeholder="Switch branch or tag…" autocomplete="off" data-pick="#panel-refs li" hx-on:input="ermite.filter(this)">
347<button type="button" class="panel-x" aria-label="Close" hx-on:click="closest('dialog').close()">
348<kbd>esc</kbd>
349</button>
350</div>
351<div class="panel-cols" data-picklist>
352<section aria-label="Branches">
353<h2>Branches <span class="count">2</span>
354</h2>
355<ul>
356<li>
357<a href="/files/tree/feature/x">
358<span class="mark" aria-hidden="true"> </span>feature/x</a>
359</li>
360<li>
361<a href="/files/tree/main" aria-current="true">
362<span class="mark" aria-hidden="true">●</span>main</a>
363</li>
364</ul>
365</section>
366<section aria-label="Tags">
367<h2>Tags <span class="count">1</span>
368</h2>
369<ul>
370<li>
371<a href="/files/tree/v1.0">
372<span class="mark" aria-hidden="true"> </span>v1.0</a>
373</li>
374</ul>
375</section>
376</div>
377</dialog>
378<dialog id="panel-cmd" class="panel modal" aria-label="Go to" hx-on:close="ermiteFinder.paletteClose()" hx-on:keydown="event.key === 'Escape' && (event.preventDefault(), this.close())" hx-on:click="event.target === this && this.close()">
379<div class="panel-head">
380<label for="cmd-q" class="sr">go to</label>
381<input id="cmd-q" type="search" placeholder="Go to a section, branch, tag, file or repository…" autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="true" aria-controls="cmd-list" aria-activedescendant="cmd-o0" hx-on:input="ermite.cmdFilter(this); ermiteFinder.palette(this)" hx-on:keydown="ermite.cmdKey(event)">
382<button type="button" class="panel-x" aria-label="Close" hx-on:click="closest('dialog').close()">
383<kbd>esc</kbd>
384</button>
385</div>
386<ul id="cmd-list" class="cmd-list" role="listbox" aria-label="Targets">
387<li id="cmd-o0" role="option" aria-selected="true" data-k="go home" data-cursor>
388<a href="/" tabindex="-1">
389<span class="lbl">home</span>
390<span class="k">go</span>
391</a>
392</li>
393<li id="cmd-o1" role="option" aria-selected="false" data-k="section summary">
394<a href="/files" tabindex="-1">
395<span class="lbl">summary</span>
396<span class="k">section</span>
397</a>
398</li>
399<li id="cmd-o2" role="option" aria-selected="false" data-k="section files">
400<a href="/files/tree/main" tabindex="-1">
401<span class="lbl">files</span>
402<span class="k">section</span>
403</a>
404</li>
405<li id="cmd-o3" role="option" aria-selected="false" data-k="section commits">
406<a href="/files/commits/main" tabindex="-1">
407<span class="lbl">commits</span>
408<span class="k">section</span>
409</a>
410</li>
411<li id="cmd-o4" role="option" aria-selected="false" data-k="section branches & tags">
412<a href="/files/refs" tabindex="-1">
413<span class="lbl">branches & tags</span>
414<span class="k">section</span>
415</a>
416</li>
417<li id="cmd-o5" role="option" aria-selected="false" data-k="section merge requests">
418<a href="/files/merge-requests" tabindex="-1">
419<span class="lbl">merge requests</span>
420<span class="k">section</span>
421</a>
422</li>
423<li id="cmd-o6" role="option" aria-selected="false" data-k="section actions">
424<a href="/files/actions" tabindex="-1">
425<span class="lbl">actions</span>
426<span class="k">section</span>
427</a>
428</li>
429<li id="cmd-o7" role="option" aria-selected="false" data-k="branch feature/x">
430<a href="/files/tree/feature/x" tabindex="-1">
431<span class="lbl">feature/x</span>
432<span class="k">branch</span>
433</a>
434</li>
435<li id="cmd-o8" role="option" aria-selected="false" data-k="branch main">
436<a href="/files/tree/main" tabindex="-1">
437<span class="lbl">main</span>
438<span class="k">branch</span>
439</a>
440</li>
441<li id="cmd-o9" role="option" aria-selected="false" data-k="tag v1.0">
442<a href="/files/tree/v1.0" tabindex="-1">
443<span class="lbl">v1.0</span>
444<span class="k">tag</span>
445</a>
446</li>
447<li id="cmd-o10" role="option" aria-selected="false" data-k="action turn single-key shortcuts on off keyboard">
448<a href="#" data-fire="keys" tabindex="-1">
449<span class="lbl">turn single-key shortcuts off</span>
450<span class="k">action</span>
451</a>
452</li>
453</ul>
454<p class="panel-foot">
455<span>
456<kbd>↑</kbd>
457<kbd>↓</kbd> move</span>
458<span>
459<kbd>enter</kbd> open</span>
460<span>
461<kbd>esc</kbd> close</span>
462</p>
463</dialog>
464<div id="keys" hidden hx-on="k-j from:body -> ermite.move(1);
465 k-k from:body -> ermite.move(-1);
466 k-top from:body -> ermite.edge(false);
467 k-bottom from:body -> ermite.edge(true);
468 k-open from:body -> ermite.open();
469 k-right from:body -> ermite.rail(true);
470 k-left from:body -> ermite.rail(false);
471 k-esc from:body -> ermite.closeDialogs();
472 k-help from:body -> ermite.dialog('panel-help');
473 k-refs from:body -> ermite.dialog('panel-refs', 'refs-filter');
474 k-cmd from:body -> ermite.dialog('panel-cmd', 'cmd-q'); ermiteFinder.load();
475 k-filter from:body -> ermite.focusFilter();
476 k-gh from:body -> ermite.go('.brand');
477 k-s from:body -> ermite.tab('s');
478 k-t from:body -> ermite.tab('t');
479 k-c from:body -> ermite.tab('c');
480 k-r from:body -> ermite.tab('r');
481 k-m from:body -> ermite.tab('m');
482 k-next from:body -> ermite.nextNote();
483 k-split from:body -> ermite.layout('split');
484 k-unified from:body -> ermite.layout('unified');
485 k-collapse from:body -> ermite.collapse();
486 k-expand from:body -> ermite.expandFile();
487 k-expandAll from:body -> ermite.expandAll();
488 k-permalink from:body -> ermite.permalink();
489 k-merge from:body -> window.ermiteMR?.openMerge();
490 k-read from:body -> window.ermiteMR?.markRead();
491 k-gf from:body -> window.ermiteMR?.focusFiles();
492 k-keys from:body -> ermite.toggleKeys()">
493</div>
494</body>
495</html>