mirror.dongdigua.github.io/org_html/cheatsheet.html

614 lines
16 KiB
HTML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
2022-09-09 16:08:21 +08:00
<!-- 2022-09-09 五 16:08 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Editor Chaetsheet</title>
<meta name="author" content="dongdigua" />
2022-07-18 14:40:59 +08:00
<meta name="generator" content="Org Mode" />
<style>
#content { max-width: 60em; margin: auto; }
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
2022-07-18 14:40:59 +08:00
border: 1px solid #e6e6e6;
border-radius: 3px;
background-color: #f2f2f2;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: auto;
}
pre.src:before {
display: none;
position: absolute;
2022-07-18 14:40:59 +08:00
top: -8px;
right: 12px;
padding: 3px;
2022-07-18 14:40:59 +08:00
color: #555;
background-color: #f2f2f299;
}
pre.src:hover:before { display: inline; margin-top: 14px;}
/* Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
2022-07-18 14:40:59 +08:00
pre.src-authinfo::before { content: 'Authinfo'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
in ob-*.el */
pre.src-cpp:before { content: 'C++'; }
pre.src-abc:before { content: 'ABC'; }
pre.src-coq:before { content: 'Coq'; }
pre.src-groovy:before { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
ob-shell.el: ob-shell is the only babel language using a lambda to put
the execution function name together. */
pre.src-bash:before { content: 'bash'; }
pre.src-csh:before { content: 'csh'; }
pre.src-ash:before { content: 'ash'; }
pre.src-dash:before { content: 'dash'; }
pre.src-ksh:before { content: 'ksh'; }
pre.src-mksh:before { content: 'mksh'; }
pre.src-posh:before { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.equation-container {
display: table;
text-align: center;
width: 100%;
}
.equation {
vertical-align: middle;
}
.equation-label {
display: table-cell;
text-align: right;
vertical-align: middle;
}
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { width: 90%; }
</style>
2022-09-09 16:08:21 +08:00
<link rel='stylesheet' type='text/css' href='./../css/main.css' />
</head>
<body>
2022-07-18 14:40:59 +08:00
<div id="content" class="content">
<h1 class="title">Editor Cheatsheet</h1>
<div id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
2022-07-18 14:40:59 +08:00
<div id="text-table-of-contents" role="doc-toc">
<ul>
2022-09-09 16:08:21 +08:00
<li><a href="#org08098e5">1. VIM</a>
<ul>
2022-09-09 16:08:21 +08:00
<li><a href="#org9cee57a">1.1. deletion</a></li>
<li><a href="#org8d885c2">1.2. edit</a></li>
<li><a href="#orgf396861">1.3. movement</a></li>
<li><a href="#org99f96aa">1.4. visual</a></li>
<li><a href="#org7c9cdc4">1.5. file/split</a></li>
</ul>
</li>
2022-09-09 16:08:21 +08:00
<li><a href="#org8b444a3">2. EMACS</a>
<ul>
2022-09-09 16:08:21 +08:00
<li><a href="#org6abdb5f">2.1. org-mode</a></li>
<li><a href="#org751c24c">2.2. normal</a></li>
<li><a href="#org3be1822">2.3. dired</a></li>
</ul>
</li>
2022-09-09 16:08:21 +08:00
<li><a href="#orgc4dea2d">3. Git</a></li>
<li><a href="#org1b5d81e">4. Fish</a></li>
</ul>
</div>
</div>
2022-09-09 16:08:21 +08:00
<div id="outline-container-org08098e5" class="outline-2">
<h2 id="org08098e5"><span class="section-number-2">1.</span> VIM</h2>
<div class="outline-text-2" id="text-1">
</div>
2022-09-09 16:08:21 +08:00
<div id="outline-container-org9cee57a" class="outline-3">
<h3 id="org9cee57a"><span class="section-number-3">1.1.</span> deletion</h3>
<div class="outline-text-3" id="text-1-1">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">key</th>
<th scope="col" class="org-left">usage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">D</td>
<td class="org-left">delete to end of line</td>
</tr>
</tbody>
</table>
</div>
</div>
2022-09-09 16:08:21 +08:00
<div id="outline-container-org8d885c2" class="outline-3">
<h3 id="org8d885c2"><span class="section-number-3">1.2.</span> edit</h3>
<div class="outline-text-3" id="text-1-2">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">key</th>
<th scope="col" class="org-left">usage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">u/C-r</td>
<td class="org-left">撤销/重做</td>
</tr>
<tr>
<td class="org-left">c i {</td>
<td class="org-left">change inside {}</td>
</tr>
<tr>
<td class="org-left">"{register}y/p</td>
<td class="org-left">向/从寄存器拷贝</td>
</tr>
</tbody>
</table>
</div>
</div>
2022-09-09 16:08:21 +08:00
<div id="outline-container-orgf396861" class="outline-3">
<h3 id="orgf396861"><span class="section-number-3">1.3.</span> movement</h3>
<div class="outline-text-3" id="text-1-3">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">key</th>
<th scope="col" class="org-left">usage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">w/e</td>
<td class="org-left">下一个单词/单词尾</td>
</tr>
<tr>
<td class="org-left">b</td>
<td class="org-left">单词头</td>
</tr>
<tr>
<td class="org-left">H/M/L</td>
<td class="org-left">当前页面可见顶部/中间/底部</td>
</tr>
<tr>
<td class="org-left">C-u(f)/d</td>
<td class="org-left">上/下翻页</td>
</tr>
<tr>
<td class="org-left">%</td>
<td class="org-left">到对应括号</td>
</tr>
<tr>
<td class="org-left">{}</td>
<td class="org-left">段落跳转</td>
</tr>
<tr>
<td class="org-left">g ;</td>
<td class="org-left">goto last change</td>
</tr>
<tr>
<td class="org-left">g */#</td>
<td class="org-left">正/反查找光标下的词</td>
</tr>
2022-08-14 17:04:27 +08:00
<tr>
<td class="org-left">g d/D</td>
<td class="org-left">跳转到本地/全局定义</td>
2022-08-14 17:04:27 +08:00
</tr>
</tbody>
</table>
</div>
</div>
2022-09-09 16:08:21 +08:00
<div id="outline-container-org99f96aa" class="outline-3">
<h3 id="org99f96aa"><span class="section-number-3">1.4.</span> visual</h3>
<div class="outline-text-3" id="text-1-4">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">key</th>
<th scope="col" class="org-left">usage</th>
<th scope="col" class="org-left">next</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">C-v</td>
<td class="org-left">矩形区域选择</td>
<td class="org-left">S-i 插入, esc 批量执行</td>
</tr>
</tbody>
</table>
</div>
</div>
2022-09-09 16:08:21 +08:00
<div id="outline-container-org7c9cdc4" class="outline-3">
<h3 id="org7c9cdc4"><span class="section-number-3">1.5.</span> file/split</h3>
<div class="outline-text-3" id="text-1-5">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">key</th>
<th scope="col" class="org-left">usage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">:n/:N</td>
<td class="org-left">文件之间切换</td>
</tr>
<tr>
<td class="org-left">:b</td>
<td class="org-left">切换到文件</td>
</tr>
<tr>
<td class="org-left">C-w h/j/k/l</td>
<td class="org-left">切换分屏窗口</td>
</tr>
<tr>
<td class="org-left">ZZ</td>
<td class="org-left">:wq</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
2022-09-09 16:08:21 +08:00
<div id="outline-container-org8b444a3" class="outline-2">
<h2 id="org8b444a3"><span class="section-number-2">2.</span> EMACS</h2>
<div class="outline-text-2" id="text-2">
</div>
2022-09-09 16:08:21 +08:00
<div id="outline-container-org6abdb5f" class="outline-3">
<h3 id="org6abdb5f"><span class="section-number-3">2.1.</span> org-mode</h3>
<div class="outline-text-3" id="text-2-1">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">key</th>
<th scope="col" class="org-left">usage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">C-c |</td>
<td class="org-left">创建表格</td>
</tr>
<tr>
<td class="org-left">C-c C-e</td>
<td class="org-left">导出 HTML</td>
</tr>
<tr>
2022-07-29 16:13:34 +08:00
<td class="org-left">M-left/right</td>
<td class="org-left">升级(promote)/降级(demote)</td>
</tr>
2022-07-18 14:14:30 +08:00
<tr>
2022-07-29 16:13:34 +08:00
<td class="org-left">C-c C-x C-v</td>
<td class="org-left">toggle render images</td>
2022-07-18 14:14:30 +08:00
</tr>
</tbody>
</table>
</div>
</div>
2022-09-09 16:08:21 +08:00
<div id="outline-container-org751c24c" class="outline-3">
<h3 id="org751c24c"><span class="section-number-3">2.2.</span> normal</h3>
2022-07-18 14:14:30 +08:00
<div class="outline-text-3" id="text-2-2">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">key</th>
<th scope="col" class="org-left">usage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">M-%</td>
<td class="org-left">替换</td>
</tr>
<tr>
2022-07-18 14:40:59 +08:00
<td class="org-left">M-;</td>
<td class="org-left">区域切换注释</td>
</tr>
<tr>
<td class="org-left">C-x C-;</td>
<td class="org-left">行切换注释</td>
</tr>
<tr>
<td class="org-left">C-y</td>
<td class="org-left">paste to minibuffer</td>
</tr>
<tr>
<td class="org-left">M-&amp;/!</td>
<td class="org-left">async/shell command</td>
</tr>
</tbody>
</table>
</div>
</div>
2022-07-29 16:13:34 +08:00
2022-09-09 16:08:21 +08:00
<div id="outline-container-org3be1822" class="outline-3">
<h3 id="org3be1822"><span class="section-number-3">2.3.</span> dired</h3>
2022-07-29 16:13:34 +08:00
<div class="outline-text-3" id="text-2-3">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">key</td>
<td class="org-left">usage</td>
</tr>
<tr>
<td class="org-left">R</td>
<td class="org-left">rename</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
2022-07-18 14:40:59 +08:00
2022-09-09 16:08:21 +08:00
<div id="outline-container-orgc4dea2d" class="outline-2">
<h2 id="orgc4dea2d"><span class="section-number-2">3.</span> Git</h2>
2022-07-18 14:40:59 +08:00
<div class="outline-text-2" id="text-3">
<div class="org-src-container">
<pre class="src src-shell">git log --stat | perl -ne 'END { print $c } $c += $1 if /(\d+) insertions/;'
git log --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }'
</pre>
</div>
</div>
</div>
2022-09-09 16:08:21 +08:00
<div id="outline-container-org1b5d81e" class="outline-2">
<h2 id="org1b5d81e"><span class="section-number-2">4.</span> Fish</h2>
<div class="outline-text-2" id="text-4">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">key</th>
<th scope="col" class="org-left">usage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">M-Left/Right</td>
<td class="org-left">jump world, or prevd/nextd</td>
</tr>
<tr>
<td class="org-left">M-s</td>
<td class="org-left">sudo the last command</td>
</tr>
<tr>
<td class="org-left">M-W</td>
<td class="org-left">what is this</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: dongdigua</p>
2022-09-09 16:08:21 +08:00
<p class="date">Created: 2022-09-09 五 16:08</p>
</div>
</body>
</html>