Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Emacs 從入門到進階
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kan-Ru Chen
August 03, 2013
Technology
310
2
Share
Emacs 從入門到進階
COSCUP 2013 的 Emacs 社群議程介紹如何從各種角度自訂 Emacs
Kan-Ru Chen
August 03, 2013
More Decks by Kan-Ru Chen
See All by Kan-Ru Chen
Rust Introduction @ Rust Meetup Taipei #1
kanru
0
110
Rust @ OSDC.tw 2014
kanru
5
490
Emacs - COSCUP 2012
kanru
1
94
Android Boot Time Optimization
kanru
0
540
Android 2.3 Introduction
kanru
0
77
0xlab's Perspective on Android System Development
kanru
0
62
Other Decks in Technology
See All in Technology
ECSのTerraformモジュールにコントリビュートした話
harukasakihara
0
210
100マイクロサービスのTerraform/Kubernetes管理地獄から抜け出すためのAI活用術
markie1009
0
160
How to learn AWS Well-Architected with AWS BuilderCards: Security Edition
coosuke
PRO
0
140
Terragrunt x Snowflake + dbt で作るマルチテナントなデータ基盤構築プラットフォーム
gak_t12
0
170
オライリーイベント登壇資料「鉄リサイクル・産廃業界におけるAI技術実応用のカタチ」
takarasawa_
0
410
ESP32 IoTを動かしながらメモリ使用量を観測してみた話
zozotech
PRO
0
140
Redmine次期バージョン7.0の注目新機能解説 — UI/UX強化と連携強化を中心に
vividtone
1
140
会社説明資料|株式会社ギークプラス ソフトウェア事業部
geekplus_tech
0
280
サイボウズ、プラットフォームエンジニアリング始めるってよ ― プラットフォームチームの事業貢献と組織アラインメントの強化
ueokande
0
110
Tachikawa.any 運営挨拶
daitasu
0
180
可視化から活用へ — Mesh化・Segmentation・アライメントの研究動向
gpuunite_official
0
220
"うちにはまだ早い"は本当? ─ 小さく始めるPlatform Engineering入門
harukasakihara
6
610
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
1
3.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Between Models and Reality
mayunak
4
290
The Limits of Empathy - UXLibs8
cassininazir
1
330
Odyssey Design
rkendrick25
PRO
2
620
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
140
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Skip the Path - Find Your Career Trail
mkilby
1
120
Test your architecture with Archunit
thirion
1
2.2k
Evolving SEO for Evolving Search Engines
ryanjones
0
190
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Transcript
Emacs 從入門到進階 COSCUP 2013
about:kanru a Debian Developer in Mozilla Vim 5+ yr Emacs
5+ yr
[email protected]
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
Unported License. To view a copy of this license, visit http://creativecommons. org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. about:license
Agenda Emacs 編輯器以其容易擴充的特性見長,本次將 介紹如何從不同的角度,用不同的方法來擴充 Emacs。從最簡單的使用內建 Customization 界 面,到安裝第三方的套件,到使用 advice 的方式
來擴充原有的功能,到自己自訂不同的編輯器 「模式」。本講假設聽眾皆有基礎的 Emacs 操作 能力,將不介紹如何使用 Emacs。
GNU Emacs 24.3 Latest stable release
Customization 超省力設定 Emacs
M-x customize
Themes
M-x customize-themes
M-x customize-create-theme
Packages
M-x list-packages
ELPA • GNU ELPA ◦ http://elpa.gnu.org • MELPA ◦ http://melpa.milkbox.net
• Marmalade ◦ http://marmalade-repo.org
Keyboard Macros
Demo
Advices
:before :around :after (defvar simple-user) (defvar simple-password) (defun simple-login ()
(interactive) (message "login with %s:%s" simple-user simple-password)) ;; no hooks ;; plain text password
defadvice Place your extension anywhere before, after and around the
target function.
:before :around :after (defadvice simple-login (before logging-before activate) (when (y-or-n-p
"Run simple login hooks") (run-hooks 'simple-login-hook))) (defadvice simple-login (around login-read-pw activate) (let ((simple-user "somebody") (simple-password "1234")) ad-do-it))
Modes
define-minor-mode
define-minor-mode (define-minor-mode highlight-fixme-mode "Highlight the document string like FIXME, XXX
and TODO in code." nil nil nil (let ((keywords '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\|XXX\\)\\>" 1 font-lock-warning-face t)))) (if highlight-fixme-mode (font-lock-add-keywords nil keywords) (font-lock-remove-keywords nil keywords))))
define-dervied-mode
define-generic-mode
define-minor-mode (define-generic-mode my-js-mode '("//" ("/*" . "*/")) '("function" "alert" "return")
nil nil nil)
http://kanru.info/misc/ipdl-mode.el 擴充 cc-mode
Debugging
EDebug
Q & A
Emacs 從入門到進階 大家來學 VIM COSCUP 2014