mirror of
https://github.com/dongdigua/dongdigua.github.io
synced 2024-11-27 21:30:53 +08:00
try to use Makefile automating org
This commit is contained in:
parent
20e01ad989
commit
134bf40d48
@ -1,4 +1,5 @@
|
|||||||
#+STARTUP: indent
|
#+STARTUP: indent
|
||||||
|
#+TITLE: Editor Cheetsheet
|
||||||
|
|
||||||
* VIM
|
* VIM
|
||||||
** deletion
|
** deletion
|
||||||
@ -43,8 +44,8 @@
|
|||||||
* EMACS
|
* EMACS
|
||||||
** org-mode
|
** org-mode
|
||||||
| key | usage |
|
| key | usage |
|
||||||
|-----------+----------|
|
|-----------+-----------|
|
||||||
| C-c \vbar | 创建表格 |
|
| C-c \vbar | 创建表格 |
|
||||||
| | |
|
| C-c C-e | 导出 HTML |
|
||||||
| | |
|
| | |
|
||||||
| | |
|
| | |
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
[steven](https://stevenbai.top/)
|
[steven](https://stevenbai.top/)
|
||||||
Rust, BlockChain<br>
|
Rust, BlockChain<br>
|
||||||
[用Go语言汇编计算fibonacci数列](https://zhuanlan.zhihu.com/p/138719668)<br>
|
[用Go语言汇编计算fibonacci数列](https://zhuanlan.zhihu.com/p/138719668)<br>
|
||||||
|
[Alynx Zhou](https://sh.alynx.one/)<br>
|
||||||
|
|
||||||
|
|
||||||
## YouTube 收集(没有账号, 这就是我的收藏夹)
|
## YouTube 收集(没有账号, 这就是我的收藏夹)
|
||||||
|
11
org/Makefile
Normal file
11
org/Makefile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
EMACS=emacs
|
||||||
|
ORG_CONFIG_FILE=publish_config.el
|
||||||
|
EMACS_OPTS=--batch --eval "(load-file \"$(ORG_CONFIG_FILE)\")" -f myweb-publish
|
||||||
|
|
||||||
|
all: html
|
||||||
|
|
||||||
|
html:
|
||||||
|
@echo "Generating HTML..."
|
||||||
|
@$(EMACS) $(EMACS_OPTS)
|
||||||
|
@echo "HTML generation done"
|
||||||
|
|
50
org/cheatsheet.org
Normal file
50
org/cheatsheet.org
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#+STARTUP: indent
|
||||||
|
|
||||||
|
* VIM
|
||||||
|
** deletion
|
||||||
|
| key | usage |
|
||||||
|
|-------+------------------------|
|
||||||
|
| x | 删除光标所在处单词 |
|
||||||
|
| de | 删除到本单词末尾 |
|
||||||
|
| db | 删除到前一个单词 |
|
||||||
|
| d$ | 删除光标位置到本行结束 |
|
||||||
|
| d0 | 删除光标位置到本行开头 |
|
||||||
|
| u/C-r | 撤销/重做 |
|
||||||
|
| | |
|
||||||
|
|
||||||
|
** movement
|
||||||
|
| key | usage |
|
||||||
|
|---------+----------------------------|
|
||||||
|
| w | 下一个单词 |
|
||||||
|
| e | 单词尾 |
|
||||||
|
| 0/$ | 行首/尾 |
|
||||||
|
| H/M/L | 当前页面可见顶部/中间/底部 |
|
||||||
|
| <num> G | 跳转到第几行 |
|
||||||
|
|
||||||
|
** visual
|
||||||
|
| key | usage | next |
|
||||||
|
|-----+--------------+------------------------|
|
||||||
|
| V | 行选择 | |
|
||||||
|
| C-v | 矩形区域选择 | S-i 插入, esc 批量执行 |
|
||||||
|
| v | | movement |
|
||||||
|
| | | |
|
||||||
|
|
||||||
|
|
||||||
|
** file/split
|
||||||
|
| key | usage |
|
||||||
|
|-------------+--------------|
|
||||||
|
| :n/:N | 文件之间切换 |
|
||||||
|
| :b | 切换到文件 |
|
||||||
|
| C-w h/j/k/l | 切换分屏窗口 |
|
||||||
|
| ZZ | :wq |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* EMACS
|
||||||
|
** org-mode
|
||||||
|
| key | usage |
|
||||||
|
|-----------+-----------|
|
||||||
|
| C-c \vbar | 创建表格 |
|
||||||
|
| C-c C-e | 导出 HTML |
|
||||||
|
| | |
|
||||||
|
| | |
|
21
org/publish_config.el
Normal file
21
org/publish_config.el
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
;; this file and Makefile from:
|
||||||
|
;; https://www.cnblogs.com/banjia/archive/2012/09/29/2708966.html
|
||||||
|
;; CSDN, 阿里云, 这些垃圾都在未授权盗搬, 结果这个东西有些地方都过时了
|
||||||
|
;; 能不能有点创新...
|
||||||
|
|
||||||
|
(require 'org)
|
||||||
|
(setq org-publish-project-alist
|
||||||
|
'(("org-pages"
|
||||||
|
:base-directory "."
|
||||||
|
:base-extension "org"
|
||||||
|
:publishing-directory "./.."
|
||||||
|
:recursive t
|
||||||
|
:publishing-function org-html-export-to-html
|
||||||
|
)))
|
||||||
|
|
||||||
|
(defun myweb-publish ()
|
||||||
|
"Publish myweb."
|
||||||
|
(interactive)
|
||||||
|
(setq debug-on-error t)
|
||||||
|
(org-publish-all))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user