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
Kan-Ru Chen
August 03, 2013
Technology
2
300
Emacs 從入門到進階
COSCUP 2013 的 Emacs 社群議程介紹如何從各種角度自訂 Emacs
Kan-Ru Chen
August 03, 2013
Tweet
Share
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
480
Emacs - COSCUP 2012
kanru
1
90
Android Boot Time Optimization
kanru
0
510
Android 2.3 Introduction
kanru
0
73
0xlab's Perspective on Android System Development
kanru
0
59
Other Decks in Technology
See All in Technology
Zabbix Conference Japan 2025 ダッシュボードコンテストLT
katayamatg
0
140
從裝潢設計圖到 Home Assistant:打造智慧家庭的實戰與踩坑筆記
kewang
0
150
今日から使える AWS Step Functions 小技集 / AWS Step Functions Tips
kinunori
5
630
LLM APIを2年間本番運用して苦労した話
ivry_presentationmaterials
16
11k
AWS 環境で GitLab Self-managed を試してみた/aws-gitlab-self-managed
emiki
0
350
Databricks Free Editionで始めるMLflow
taka_aki
0
860
Logik: A Free and Open-source FPGA Toolchain
omasanori
0
260
3年ぶりの re:Invent 今年の意気込みと前回の振り返り
kazzpapa3
0
190
QAセントラル組織が運営する自動テストプラットフォームの課題と現状
lycorptech_jp
PRO
0
250
ソフトウェアテストのAI活用_ver1.50
fumisuke
0
280
エンジニアにとってコードと並んで重要な「データ」のお話 - データが動くとコードが見える:関数型=データフロー入門
ismk
0
380
LINE公式アカウントの技術スタックと開発の裏側
lycorptech_jp
PRO
0
300
Featured
See All Featured
Balancing Empowerment & Direction
lara
5
730
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Raft: Consensus for Rubyists
vanstee
140
7.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
660
RailsConf 2023
tenderlove
30
1.3k
The World Runs on Bad Software
bkeepers
PRO
72
12k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
192
56k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8k
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