mirror.dongdigua.github.io/org_html/cheatsheet.html
2022-11-18 13:34:47 +08:00

566 lines
15 KiB
HTML

<?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-07-26 二 15:40 -->
<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" />
<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 {
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;
top: -8px;
right: 12px;
padding: 3px;
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'; }
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>
<link rel='stylesheet' type='text/css' href='./../css/org-css.css' />
</head>
<body>
<div id="content" class="content">
<h1 class="title">Editor Cheatsheet</h1>
<div 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="#org716cc1f">1. VIM</a>
<ul>
<li><a href="#org0aea217">1.1. deletion</a></li>
<li><a href="#org9c40714">1.2. movement</a></li>
<li><a href="#org9045732">1.3. visual</a></li>
<li><a href="#orgef680e9">1.4. file/split</a></li>
</ul>
</li>
<li><a href="#org8c6df9b">2. EMACS</a>
<ul>
<li><a href="#org84d4152">2.1. org-mode</a></li>
<li><a href="#orgc0a6693">2.2. normal</a></li>
</ul>
</li>
<li><a href="#orgb3c7ff0">3. Git (虽然不算editor, 但是先也放这吧)</a></li>
</ul>
</div>
</div>
<div id="outline-container-org716cc1f" class="outline-2">
<h2 id="org716cc1f"><span class="section-number-2">1.</span> VIM</h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-org0aea217" class="outline-3">
<h3 id="org0aea217"><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">x</td>
<td class="org-left">删除光标所在处单词</td>
</tr>
<tr>
<td class="org-left">de</td>
<td class="org-left">删除到本单词末尾</td>
</tr>
<tr>
<td class="org-left">db</td>
<td class="org-left">删除到前一个单词</td>
</tr>
<tr>
<td class="org-left">d$</td>
<td class="org-left">删除光标位置到本行结束</td>
</tr>
<tr>
<td class="org-left">d0</td>
<td class="org-left">删除光标位置到本行开头</td>
</tr>
<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>
</tbody>
</table>
</div>
</div>
<div id="outline-container-org9c40714" class="outline-3">
<h3 id="org9c40714"><span class="section-number-3">1.2.</span> movement</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">w</td>
<td class="org-left">下一个单词</td>
</tr>
<tr>
<td class="org-left">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">0/$</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">&lt;num&gt; G</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">f/F &lt;char&gt;</td>
<td class="org-left">在一行中向后/前跳到某个字符</td>
</tr>
<tr>
<td class="org-left">%</td>
<td class="org-left">到对应括号</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="outline-container-org9045732" class="outline-3">
<h3 id="org9045732"><span class="section-number-3">1.3.</span> visual</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" />
<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">V</td>
<td class="org-left">行选择</td>
<td class="org-left">&#xa0;</td>
</tr>
<tr>
<td class="org-left">C-v</td>
<td class="org-left">矩形区域选择</td>
<td class="org-left">S-i 插入, esc 批量执行</td>
</tr>
<tr>
<td class="org-left">v</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">movement</td>
</tr>
<tr>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="outline-container-orgef680e9" class="outline-3">
<h3 id="orgef680e9"><span class="section-number-3">1.4.</span> file/split</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" />
</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>
<div id="outline-container-org8c6df9b" class="outline-2">
<h2 id="org8c6df9b"><span class="section-number-2">2.</span> EMACS</h2>
<div class="outline-text-2" id="text-2">
</div>
<div id="outline-container-org84d4152" class="outline-3">
<h3 id="org84d4152"><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>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
</tr>
<tr>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="outline-container-orgc0a6693" class="outline-3">
<h3 id="orgc0a6693"><span class="section-number-3">2.2.</span> normal</h3>
<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">C-s</td>
<td class="org-left">搜索</td>
</tr>
<tr>
<td class="org-left">M-%</td>
<td class="org-left">替换</td>
</tr>
<tr>
<td class="org-left">C-_</td>
<td class="org-left"><a href="https://linuxtoy.org/archives/emacs-undo-tree.html">undo/redo</a></td>
</tr>
<tr>
<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>
</tbody>
</table>
</div>
</div>
</div>
<div id="outline-container-orgb3c7ff0" class="outline-2">
<h2 id="orgb3c7ff0"><span class="section-number-2">3.</span> Git (虽然不算editor, 但是先也放这吧)</h2>
<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>
</div>
<div id="postamble" class="status">
<p class="author">Author: dongdigua</p>
<p class="date">Created: 2022-07-26 二 15:40</p>
</div>
</body>
</html>