-
Notifications
You must be signed in to change notification settings - Fork 1
/
tag-linux.html
546 lines (507 loc) · 22.9 KB
/
tag-linux.html
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="alternate"
type="application/rss+xml"
href="https://chenyo.me/rss.xml"
title="RSS feed for https://chenyo.me">
<title>Chenyo's Blog</title>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'],['\\(','\\)']]}});
</script>
<meta name="author" content="chenyo">
<meta name="referrer" content="no-referrer">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="assets/style.css" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"/>
<link rel="favicon" type="image/x-icon" href="favicon.ico">
<script src="assets/search.js"></script></head>
<body>
<div id="preamble" class="status">
<header>
<h1><a href="https://chenyo.me">Chenyo's org-static-blog</a></h1>
<nav>
<a href="https://chenyo.me">Home</a>
<a href="archive.html">Archive</a>
<a href="tags.html">Tags</a>
<div id="search-container">
<input type="text" id="search-input" placeholder="Search anywhere...">
<i class="fas fa-search search-icon"></i>
</div>
</nav>
</header></div>
<div id="content">
<h1 class="title">Posts tagged "linux":</h1>
<div class="post-date">07 Sep 2024</div><h1 class="post-title"><a href="https://chenyo.me/2024-09-07-install-doom-emacs-with-lisp-native-compiler-in-wsl2.html">Install Doom Emacs with Lisp native compilation in WSL2</a></h1>
<nav id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#org967b036">1. Assumptions</a></li>
<li><a href="#org9d97c4c">2. Install prerequisite packages</a></li>
<li><a href="#org98ff32c">3. Install Emacs 29.4</a>
<ul>
<li><a href="#org140f84e">3.1. Before building</a></li>
<li><a href="#org702e974">3.2. Build Emacs 29.4 with native-comp</a></li>
</ul>
</li>
<li><a href="#orge6212e6">4. Install <code>ripgrep</code></a></li>
<li><a href="#org5750277">5. Install Doom Emacs</a></li>
<li><a href="#org219c7a4">6. Some issues with running Emacs in WSL2</a></li>
</ul>
</div>
</nav>
<p>
Today I installed Doom Emacs for my husband on his WSL2.
Although the entire process was guided by Claude, there were some back-and-forth during the interaction.
Therefore I would like to record the full commands I have used here in sequence for any potential reference.
</p>
<div id="outline-container-org967b036" class="outline-2">
<h2 id="org967b036"><span class="section-number-2">1.</span> Assumptions</h2>
<div class="outline-text-2" id="text-1">
<p>
This installation guide assumes a fresh installation of WSL2 Ubuntu 22.04 on Windows 11 in 2024 September.
</p>
</div>
</div>
<div id="outline-container-org9d97c4c" class="outline-2">
<h2 id="org9d97c4c"><span class="section-number-2">2.</span> Install prerequisite packages</h2>
<div class="outline-text-2" id="text-2">
<p>
According to the Doom Emacs <a href="https://github.com/doomemacs/doomemacs#prerequisites">documentation</a>, the following packages are recommended:
</p>
<ul class="org-ul">
<li>Git 2.23+: this is already installed by default.</li>
<li>Emacs 29.4 with <a href="https://www.emacswiki.org/emacs/GccEmacs">Lisp native compilation</a>: this is finicky and will be elaborated later.</li>
<li>ripgrep 14.0+: the documentation says 11.0+ suffices, but <code>doom doctor</code> still complains the latest version (13.0) installed from <code>apt</code> is not advanced, so we need to install it from its Github released package later.</li>
<li>GNU find: also installed already.</li>
<li>fd: <code>sudo apt install fd-find</code> suffices.</li>
</ul>
</div>
</div>
<div id="outline-container-org98ff32c" class="outline-2">
<h2 id="org98ff32c"><span class="section-number-2">3.</span> Install Emacs 29.4</h2>
<div class="outline-text-2" id="text-3">
</div>
<div id="outline-container-org140f84e" class="outline-3">
<h3 id="org140f84e"><span class="section-number-3">3.1.</span> Before building</h3>
<div class="outline-text-3" id="text-3-1">
<p>
First, let’s install some build dependencies:
</p>
<div class="org-src-container">
<pre class="src src-bash"><span style="color: #ECBE7B;">sudo</span> apt update
<span style="color: #ECBE7B;">sudo</span> apt upgrade <span style="color: #5B6268;"># </span><span style="color: #5B6268;">update packages</span>
<span style="color: #ECBE7B;">sudo</span> apt install build-essential libjansson4 libjansson-dev <span style="color: #98be65;">\</span>
libgnutls28-dev libtree-sitter-dev libsqlite3-dev
<span style="color: #ECBE7B;">sudo</span> apt install texinfo <span style="color: #5B6268;"># </span><span style="color: #5B6268;">to generate documentation</span>
</pre>
</div>
<p>
<code>build-essnetial</code> should install necessary tools to build C/C++ programs such as gcc, g++, make, gdb and dpkg.
The rest packages install pre-compiled libraries.
</p>
<p>
Besides these packages, there are two important packages to support Lisp native compilation:
</p>
<div class="org-src-container">
<pre class="src src-bash"><span style="color: #ECBE7B;">sudo</span> apt install ibgccjit0 libgccjit-11-dev <span style="color: #5B6268;"># </span><span style="color: #5B6268;">11 is my gcc version</span>
</pre>
</div>
<p>
After installing them, make sure to export the path in the current session, otherwise the compiler will not realize it.
</p>
<div class="org-src-container">
<pre class="src src-bash"><span style="color: #c678dd;">export</span> <span style="color: #dcaeea;">LD_LIBRARY_PATH</span>=/usr/lib/gcc/x86_64-linux-gnu/11:$<span style="color: #dcaeea;">LD_LIBRARY_PATH</span>
</pre>
</div>
<p>
The last thing to do is install a bunch of X and GTK-3 development libraries for Emacs GUI, and another bunch of image processing libraries.
</p>
<div class="org-src-container">
<pre class="src src-bash"><span style="color: #ECBE7B;">sudo</span> apt install libx11-dev libtiff-dev libgtk-3-dev libncurses-dev
<span style="color: #ECBE7B;">sudo</span> apt install libtiff5-dev libgif-dev libjpeg-dev libpng-dev libxpm-dev
</pre>
</div>
<p>
Without the above packages, one may encounter the following error when configuring the Emacs build:
</p>
<blockquote>
<p>
You seem to be running X, but no X development libraries
were found. You should install the relevant development files for X
and for the toolkit you want, such as Gtk+ or Motif. Also make
sure you have development files for image handling, i.e.
tiff, gif, jpeg, png and xpm.
</p>
</blockquote>
</div>
</div>
<div id="outline-container-org702e974" class="outline-3">
<h3 id="org702e974"><span class="section-number-3">3.2.</span> Build Emacs 29.4 with native-comp</h3>
<div class="outline-text-3" id="text-3-2">
<p>
At this moment, we can start to download Emacs source code:
</p>
<div class="org-src-container">
<pre class="src src-bash">wget https://ftp.gnu.org/gnu/emacs/emacs-29.4.tar.xz
tar xvf emacs-29.4.tar.xz
<span style="color: #ECBE7B;">cd</span> emacs-29.4
</pre>
</div>
<p>
Then we can configure the build (i.e., generate Makefile) with the following command.
</p>
<div class="org-src-container">
<pre class="src src-bash">./configure --with-native-compilation --with-x-toolkit=gtk3 --without-pop
</pre>
</div>
<ul class="org-ul">
<li><code>--with-native-compilation</code>: with this flag the Emacs source code is compiled to native machine code to achieve better performance.
<ul class="org-ul">
<li>Otherwise it is compiled to bytecode and then interpreted by Emacs virtual machine during runtime.</li>
</ul></li>
<li><code>--with-x-toolkit=gtk3</code>: this is recommended by Claude.</li>
<li><code>--without-pop</code>: if we are not using Emacs as the email client, we don’t need to bother configure the protocol.</li>
</ul>
<p>
If everything goes well, one should see the following line in the output.
If not, make sure <code>libgccjit</code> has been installed and exported.
</p>
<blockquote>
<p>
Does Emacs have native lisp compiler? yes
</p>
</blockquote>
<p>
Now we can finally start compiling the Emacs:
</p>
<div class="org-src-container">
<pre class="src src-bash"><span style="color: #ECBE7B;">make</span> -j$<span style="color: #51afef;">(</span>nproc<span style="color: #51afef;">)</span>
</pre>
</div>
<p>
If some error occurs, we may want to start again, to do this:
</p>
<div class="org-src-container">
<pre class="src src-bash"><span style="color: #ECBE7B;">sudo</span> apt install autoconf automake
<span style="color: #ECBE7B;">rm</span> -f Makefile
./autogen.sh <span style="color: #5B6268;"># </span><span style="color: #5B6268;">regenerate the configuration file</span>
<span style="color: #5B6268;"># </span><span style="color: #5B6268;">then rebuild</span>
<span style="color: #ECBE7B;">make</span> -j$<span style="color: #51afef;">(</span>nproc<span style="color: #51afef;">)</span>
</pre>
</div>
<p>
Finally, install Emacs globally:
</p>
<div class="org-src-container">
<pre class="src src-bash"><span style="color: #ECBE7B;">sudo</span> <span style="color: #ECBE7B;">make</span> install
</pre>
</div>
<p>
To confirm the Emacs indeed used the native Lisp compiler, one can evaluate inside the vanilla Emacs with <code>M-:</code> (<code>M</code> is <code>Alt</code> in WSL2):
</p>
<div class="org-src-container">
<pre class="src src-lisp">(native-comp-available-p) <span style="color: #5B6268;">;; </span><span style="color: #5B6268;">should return t</span>
</pre>
</div>
<p>
Congratulations! You have now installed the latest and fastest Emacs on WSL2.
</p>
</div>
</div>
</div>
<div id="outline-container-orge6212e6" class="outline-2">
<h2 id="orge6212e6"><span class="section-number-2">4.</span> Install <code>ripgrep</code></h2>
<div class="outline-text-2" id="text-4">
<p>
As mentioned in ripgrep <a href="https://github.com/BurntSushi/ripgrep?tab=readme-ov-file#installation">documentation</a>, for Debian/Ubuntu users, one should
install the latest ripgrep 14.0+ with the following commands.
</p>
<div class="org-src-container">
<pre class="src src-bash"><span style="color: #ECBE7B;">curl</span> -LO https://github.com/BurntSushi/ripgrep/releases/download/14.1.0/ripgrep_14.1.0-1_amd64.deb <span style="color: #5B6268;"># </span><span style="color: #5B6268;">check the latest version on its documentation</span>
<span style="color: #ECBE7B;">sudo</span> dpkg -i ripgrep_14.1.0-1_amd64.deb <span style="color: #5B6268;"># </span><span style="color: #5B6268;">dpkg has been installed before</span>
</pre>
</div>
<p>
Instead, if one installs it with <code>apt</code>, a 13.0+ version is installed and running <code>doom doctor</code> later returns the warning:
</p>
<blockquote>
<p>
The installed ripgrep binary was not built with support for PCRE lookaheads.
</p>
</blockquote>
</div>
</div>
<div id="outline-container-org5750277" class="outline-2">
<h2 id="org5750277"><span class="section-number-2">5.</span> Install Doom Emacs</h2>
<div class="outline-text-2" id="text-5">
<p>
Installing Doom Emacs is straightforward, but before that, one should first remove the default Emacs configuration folder:
</p>
<div class="org-src-container">
<pre class="src src-bash"><span style="color: #ECBE7B;">rm</span> -rf ~/.emacs.d
</pre>
</div>
<p>
Then, clone and install Doom Emacs, it could take a while.
</p>
<div class="org-src-container">
<pre class="src src-bash"><span style="color: #ECBE7B;">git</span> clone --depth <span style="color: #da8548; font-weight: bold;">1</span> https://github.com/doomemacs/doomemacs ~/.config/emacs
~/.config/emacs/bin/doom install
</pre>
</div>
<p>
Don’t forget to export <code>~/.config/emacs/bin</code> to <code>PATH</code>:
</p>
<div class="org-src-container">
<pre class="src src-bash"><span style="color: #ECBE7B;">echo</span> <span style="color: #98be65;">'export PATH="$HOME/.config/emacs/bin:$PATH"'</span> >> ~/.bashrc
<span style="color: #c678dd;">source</span> ~/.bashrc
</pre>
</div>
<p>
Now one can run <code>doom doctor</code> to check any missing dependencies, e.g., <code>shellcheck</code>.
One common issue is the Nerd font is not installed by default so that some icons are not properly displayed.
To fix that, run <code>M-x nerd-icons-install-font</code> inside the Emacs, then update the font cache with:
</p>
<div class="org-src-container">
<pre class="src src-bash">fc-cache -fv
<span style="color: #5B6268;"># </span><span style="color: #5B6268;">fc-list | </span><span style="color: #5B6268;">grep</span><span style="color: #5B6268;"> Nerd # to verify the font is installed</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org219c7a4" class="outline-2">
<h2 id="org219c7a4"><span class="section-number-2">6.</span> Some issues with running Emacs in WSL2</h2>
<div class="outline-text-2" id="text-6">
<ul class="org-ul">
<li><p>
The first thing is I cannot reload the configuration with <code>M-x doom/reload</code> as running this command always gives me the following error message so that I need to restart the Emacs every time the configuration is changed.
</p>
<blockquote>
<p>
%s sync -B -e
/bin/bash: line 1: fg: no job control
</p>
</blockquote></li>
<li>I really dislike the <a href="https://www.reddit.com/r/wsl2/comments/16b4skx/wsl_softwares_with_white_window_borders/">white border</a> that surrounds any application launched by WSL!</li>
</ul>
</div>
</div>
<div class="taglist"><a href="https://chenyo.me/tags.html">Tags</a>: <a href="https://chenyo.me/tag-linux.html">linux</a> <a href="https://chenyo.me/tag-emacs.html">emacs</a> <a href="https://chenyo.me/tag-tool.html">tool</a> </div>
<div class="post-date">24 Jun 2024</div><h1 class="post-title"><a href="https://chenyo.me/2024-06-24-a-stupid-debugging-experience.html">A stupid debugging experience</a></h1>
<nav id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#orgb8fb5fc">1. What happened</a></li>
<li><a href="#orgebf733a">2. What did I do</a></li>
<li><a href="#org98115f4">3. Another issue of running RPC in docker</a></li>
</ul>
</div>
</nav>
<div id="outline-container-orgb8fb5fc" class="outline-2">
<h2 id="orgb8fb5fc"><span class="section-number-2">1.</span> What happened</h2>
<div class="outline-text-2" id="text-1">
<ul class="org-ul">
<li>Servers SA and SB have the same docker installation, and the same running container CA and CB.</li>
<li><p>
A Go file G can be built on CA, but on CB it reports this error:
</p>
<p class="verse">
runtime: failed to create new OS thread (have 2 already; errno=11)<br>
runtime: may need to increase max user processes (ulimit -u)<br>
fatal error: newosproc<br>
</p></li>
</ul>
</div>
</div>
<div id="outline-container-orgebf733a" class="outline-2">
<h2 id="orgebf733a"><span class="section-number-2">2.</span> What did I do</h2>
<div class="outline-text-2" id="text-2">
<ol class="org-ol">
<li>I compared any related configurations between SA and SB. and between CA and CB, e.g., <code class="src src-bash"><span style="color: #c678dd;">ulimit</span> -a</code>, <code class="src src-bash">/etc/security/limits.conf</code>. They all look the same.</li>
<li>I created a new container CN on SA with the same docker image, CN can compile G.</li>
<li>I looked into the (complex) <code>docker run</code> script for CA/CB and figured out it was due to a resource constraint <code>--pids-limit 100</code>.
<ul class="org-ul">
<li>Increasing this limit to 200 seems resolve the issue, but I had no idea why the Go compiler needed so many resources (perhaps due to package I imported).</li>
</ul></li>
<li><b><b>Until this point</b></b>, I realized, since the container did not support the compilation, why not just only transfer the compiled binary!
<ul class="org-ul">
<li>How silly that I didn’t even try this in the beginning!</li>
</ul></li>
<li>Since the program imports the <code>net</code> package, and there is a <a href="https://www.reddit.com/r/golang/comments/pi97sp/what_is_the_consequence_of_using_cgo_enabled0/">known issue</a> of Alpine image running a Go binary file, I followed the post and disabled <code>CGO</code> on SA, then <code>docker cp</code> the binary to CA, and it worked.</li>
</ol>
</div>
</div>
<div id="outline-container-org98115f4" class="outline-2">
<h2 id="org98115f4"><span class="section-number-2">3.</span> Another issue of running RPC in docker</h2>
<div class="outline-text-2" id="text-3">
<ul class="org-ul">
<li>The other day, I also spent hours debugging a <code>route unreachable</code> error when I want to send a request from CA to SA.</li>
<li>The CA is using the <code>bridge</code> network, so it should talk to SA via SA’s interface <code>docker0</code> within the subnet <code>172.17.0.0/16</code>.</li>
<li><p>
However, in my case, the docker by default rejects packages from any container as shown in SA’s <code>tcpdump</code> result:
</p>
<p class="verse">
172.17.0.1->172.17.0.3 ICMP host unreachable- admin prohibited, length 68<br>
</p></li>
<li><p>
By checking SA’s iptables, I found this rule:
</p>
<div class="org-src-container">
<pre class="src src-bash"> -A INPUT -j REJECT --reject-with icmp-host-prohibited
</pre>
</div>
<ul class="org-ul">
<li>Strangely, the <code>ping</code> still works with this rule.</li>
</ul></li>
<li><p>
In the end, I need to append a new rule to make the RPC work.
</p>
<div class="org-src-container">
<pre class="src src-bash"> iptables -I INPUT <span style="color: #da8548; font-weight: bold;">1</span> -i docker0 -p tcp --dport <port> -s 172.17.0.0/16 -j ACCEPT
</pre>
</div></li>
</ul>
</div>
</div>
<div class="taglist"><a href="https://chenyo.me/tags.html">Tags</a>: <a href="https://chenyo.me/tag-docker.html">docker</a> <a href="https://chenyo.me/tag-go.html">go</a> <a href="https://chenyo.me/tag-linux.html">linux</a> <a href="https://chenyo.me/tag-alpine.html">alpine</a> </div>
<div class="post-date">24 Jun 2024</div><h1 class="post-title"><a href="https://chenyo.me/2024-06-24-linux-use-tips.html">Linux use tips</a></h1>
<nav id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#org37fc08e">1. i3</a>
<ul>
<li><a href="#org4045976">1.1. Move specific workspaces between different monitors (ref)</a></li>
</ul>
</li>
<li><a href="#orgea6949f">2. Org</a>
<ul>
<li><a href="#orgb3984b6">2.1. Format code blocks</a></li>
</ul>
</li>
<li><a href="#orgb39b55f">3. Emacs</a>
<ul>
<li><a href="#org86284de">3.1. Prefix argument</a></li>
<li><a href="#org6be7689">3.2. Help functions</a></li>
</ul>
</li>
<li><a href="#org2c7ccba">4. Vim</a>
<ul>
<li><a href="#org807aae2">4.1. Delete a word backwards</a></li>
</ul>
</li>
<li><a href="#org2426f93">5. Firefox</a>
<ul>
<li><a href="#orgebec975">5.1. Cache bypass refresh</a></li>
</ul>
</li>
</ul>
</div>
</nav>
<div id="outline-container-org37fc08e" class="outline-2">
<h2 id="org37fc08e"><span class="section-number-2">1.</span> i3</h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-org4045976" class="outline-3">
<h3 id="org4045976"><span class="section-number-3">1.1.</span> Move specific workspaces between different monitors <a href="https://i3wm.org/docs/user-contributed/swapping-workspaces.html">(ref)</a></h3>
<div class="outline-text-3" id="text-1-1">
<ol class="org-ol">
<li>Adjust the monitor relative positions.</li>
<li>Use <code class="src src-bash">i3-msg -- move workspace to output right</code> to move the <b><b>current</b></b> workspace to the monitor on the right</li>
</ol>
</div>
</div>
</div>
<div id="outline-container-orgea6949f" class="outline-2">
<h2 id="orgea6949f"><span class="section-number-2">2.</span> Org</h2>
<div class="outline-text-2" id="text-2">
</div>
<div id="outline-container-orgb3984b6" class="outline-3">
<h3 id="orgb3984b6"><span class="section-number-3">2.1.</span> Format code blocks</h3>
<div class="outline-text-3" id="text-2-1">
<ul class="org-ul">
<li>Use the shortcut <code>< s <TAB></code> to create a code block.</li>
<li>Use <code>C-c '</code> to enter the code environment to use the language major mode.</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-orgb39b55f" class="outline-2">
<h2 id="orgb39b55f"><span class="section-number-2">3.</span> Emacs</h2>
<div class="outline-text-2" id="text-3">
</div>
<div id="outline-container-org86284de" class="outline-3">
<h3 id="org86284de"><span class="section-number-3">3.1.</span> Prefix argument</h3>
<div class="outline-text-3" id="text-3-1">
<ul class="org-ul">
<li>When the function includes <code>(interactive "P")</code>, it means one can add a prefix argument <code>C-u 1</code> (or any integer) to trigger some effect.</li>
</ul>
</div>
</div>
<div id="outline-container-org6be7689" class="outline-3">
<h3 id="org6be7689"><span class="section-number-3">3.2.</span> Help functions</h3>
<div class="outline-text-3" id="text-3-2">
<ul class="org-ul">
<li><code>Ctrl-h K</code> get the function name given a shortcut</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-org2c7ccba" class="outline-2">
<h2 id="org2c7ccba"><span class="section-number-2">4.</span> Vim</h2>
<div class="outline-text-2" id="text-4">
</div>
<div id="outline-container-org807aae2" class="outline-3">
<h3 id="org807aae2"><span class="section-number-3">4.1.</span> Delete a word backwards</h3>
<div class="outline-text-3" id="text-4-1">
<ul class="org-ul">
<li><code>diw</code> or <code>daw</code></li>
</ul>
</div>
</div>
</div>
<div id="outline-container-org2426f93" class="outline-2">
<h2 id="org2426f93"><span class="section-number-2">5.</span> Firefox</h2>
<div class="outline-text-2" id="text-5">
</div>
<div id="outline-container-orgebec975" class="outline-3">
<h3 id="orgebec975"><span class="section-number-3">5.1.</span> Cache bypass refresh</h3>
<div class="outline-text-3" id="text-5-1">
<ul class="org-ul">
<li><code>Ctrl+Shift+R</code></li>
</ul>
</div>
</div>
</div>
<div class="taglist"><a href="https://chenyo.me/tags.html">Tags</a>: <a href="https://chenyo.me/tag-tool.html">tool</a> <a href="https://chenyo.me/tag-linux.html">linux</a> <a href="https://chenyo.me/tag-i3.html">i3</a> <a href="https://chenyo.me/tag-arch.html">arch</a> </div><div id="archive">
<a href="https://chenyo.me/archive.html">Other posts</a>
</div>
</div>
<div id="postamble" class="status"><div id="search-results"></div>
<footer>
<div class="footer-content">
<div class="footer-left">
<p>© 2024 chenyo. Some rights reserved.</p>
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">
<img alt="Creative Commons License" style="border-width: 0"
src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png"/>
</a>
</div>
<div class="social-links">
<a href="https://t.me/chenyo17" target="_blank" rel="noopener noreferrer">
<i class="fab fa-telegram"></i>
</a>
<a href="https://github.com/chenyo-17" target="_blank" rel="noopener noreferrer">
<i class="fab fa-github"></i>
</a>
</div>
</footer></div>
</body>
</html>