Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Emacsとその周辺 / Emacs and CLI tools
Search
FUJIWARA Shunichiro
June 16, 2017
Technology
3
9.4k
Emacsとその周辺 / Emacs and CLI tools
社内勉強会の資料です
FUJIWARA Shunichiro
June 16, 2017
Tweet
Share
More Decks by FUJIWARA Shunichiro
See All by FUJIWARA Shunichiro
Amazon ECS デプロイツール ecspresso の開発を支える「正しい抽象化」の探求 / YAPC::Fukuoka 2025
fujiwara3
13
5.6k
パフォーマンスチューニングのために普段からできること/Performance Tuning: Daily Practices
fujiwara3
2
260
alecthomas/kong はいいぞ
fujiwara3
6
2k
ecspressoの設計思想に至る道 / sekkeinight2025
fujiwara3
12
3.1k
さくらのIaaS基盤のモニタリングとOpenTelemetry/OSC Hokkaido 2025
fujiwara3
3
1.4k
監視のこれまでとこれから/sakura monitoring seminar 2025
fujiwara3
11
5.5k
k6による負荷試験 入門から日常的な実践まで/Re:TechTalk #01
fujiwara3
2
220
困難を「一般解」で解く
fujiwara3
10
3.9k
「隙間家具OSS」に至る道/Fujiwara Tech Conference 2025
fujiwara3
7
14k
Other Decks in Technology
See All in Technology
Dify on AWS の選択肢
ysekiy
0
120
type-challenges を全問解いたのでエッセンスと推し問題を紹介してみる
kworkdev
PRO
0
160
Master Dataグループ紹介資料
sansan33
PRO
1
4k
ページの可視領域を算出する方法について整理する
yamatai1212
0
140
一億総業務改善を支える社内AIエージェント基盤の要諦
yukukotani
8
2.3k
Digitization部 紹介資料
sansan33
PRO
1
6.1k
mablでリグレッションテストをデイリー実行するまで #mablExperience
bengo4com
0
450
【ASW21-02】STAMP/CAST分析における生成AIの支援 ~羽田空港航空機衝突事故を題材として (Support of Generative AI in STAMP/CAST Analysis - A Case Study Based on the Haneda Airport Aircraft Accident -)
hianraku9498
2
500
段階的に進める、 挫折しない自宅サーバ入門
yu_kod
5
2.1k
『星の世界の地図の話: Google Sky MapをAI Agentでよみがえらせる』 - Google Developers DevFest Tokyo 2025
taniiicom
0
450
意外と難しいドメイン駆動設計の話
zozotech
PRO
0
810
シンプルを極める。アンチパターンなDB設計の本質
facilo_inc
1
730
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Done Done
chrislema
186
16k
Code Reviewing Like a Champion
maltzj
527
40k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
The Cult of Friendly URLs
andyhume
79
6.7k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Context Engineering - Making Every Token Count
addyosmani
9
450
Transcript
Emacsͱͦͷपล 2017.06.09 @fujiwara
ͳͥ Emacs Λ͍ͬͯΔͷ͔ 1. େֶͰ࠷ॳʹΘ͞Εͨͷ͕ Mule ͩͬͨ(1994) Emacs → Nemacs(ຊޠԽ)
→ Mule(ଟݴޠԽ) → ຊମʹՌऔΓࠐΈ(Emacs 20,21) 2. ͦͷޙ JED Λ Emacs ΩʔόΠϯυͰͬͯͨ(2000) www.jedsoft.org/jed/ 3. Emacs ʹ͖ͬͯͨ (200?)
Vim ͍·͢ .vimrc 1ߦ syntax on • Ͳ͜ͷαʔόͰ࡞ۀ͢ΔͨΊ • ઃఆϑΝΠϧͳΜͱͳ͘
vim Ͱ͍͡Δ͜ͱ͕ଟ͍
screen .screenrc ̍ߦ escape ^z^z • Ͳ͜ͷαʔόͰ࡞ۀ͢ΔͨΊ • Ctrl-A ͩͱਏ͍
$ echo "escape ^z^z" > ~/.screenrc ιϥͰଧͯΔ
emacsclient ىಈ͍ͯ͠Δ Emacs ʹରͯ͠ϑΝΠϧΛ։͔ͤΔίϚϯυ ;; .emacs (server-start) # .zshrc alias
ec='emacsclient -n' $ ec ϑΝΠϧ໊ Ͱىಈ͍ͯ͠Δ Emacs ͰϑΝΠϧΛ։͚Δ
emacsclient -n Φϓγϣϯ: block͠ͳ͍ EmacsʹϑΝΠϧΛ։͔ͤͨΒͬͯ͘Δ (σϑΥϧτϑΝΠϧΛด͡Δ·Ͱͭ) ීஈ͜ΕΛ͏
EDITOR=emacsclient # .zshrc export EDITOR=$HOME/local/bin/emacsclient git commit ͨ͠ͱ͖ʹ Emacs ͰίϛοτϩάΛฤूͰ͖Δ
(͜ͷ߹ -n Λ͚͍͚ͯͳ͍)
peco github.com/peco/peco Ctrl-R ͰώετϦΛ peco ͰḷΔ # .zshrc function peco_select_history()
{ BUFFER=$(fc -l -n 1 | gtac | peco --query "$LBUFFER") CURSOR=$#BUFFER # move cursor zle -R -c # refresh } zle -N peco_select_history bindkey '^R' peco_select_history
ghq + peco github.com/motemen/ghq GoͷϦϙδτϦϨΠΞτͰશͯͷ git repo Λஔ͢Δౕ peco Ͱબͯ͠
cd ͢Δ function peco-src () { local selected_dir=$(ghq list | peco --query "$LBUFFER") if [ -n "$selected_dir" ]; then BUFFER="cd $HOME/src/${selected_dir}" zle accept-line fi zle clear-screen } zle -N peco-src bindkey '^]' peco-src
direnv github.com/direnv/direnv # .envrc export AWS_PROFILE=someproject-assumerole export AWS_REGION=ap-northeast-1 $ cd
/Users/fujiwara/src/github.com/fujiwara/someproject direnv: loading .envrc direnv: export +AWS_PROFILE +AWS_REGION ϓϩδΣΫτʹԠͨ͡ڥมΛઃఆ
gh-open github.com/typester/gh-open $ gh-open ~/path/to/repo GitHubͷϖʔδΛϒϥβͰ։͍ͯ͘ΕΔ
ag + peco + ec github.com/ggreer/the_silver_searcher/ ཁ͢Δʹ͍͢͝ grep # .zshrc
agec () { emacsclient -n $(ag $@ | peco --query "$LBUFFER" | awk -F: '{print "+" $2, $1}') } ag Ͱ grep ͨ݁͠ՌΛ peco Ͱબ "ϑΝΠϧ໊:ߦ൪߸:ߦͷ༰" → awk Ͱ "+ߦ൪߸ ϑΝΠϧ໊" emacsclient -n +10 foo.txt (foo.txt Λ Emacs Ͱ։͍ͯ10ߦʹҠಈ)