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とその周辺 / Emacs and CLI tools
Search
FUJIWARA Shunichiro
June 16, 2017
Technology
9.5k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Emacsとその周辺 / Emacs and CLI tools
社内勉強会の資料です
FUJIWARA Shunichiro
June 16, 2017
More Decks by FUJIWARA Shunichiro
See All by FUJIWARA Shunichiro
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
380
クラウドを使う側から、作る側へ / 大吉祥寺.pm 2026前夜祭
fujiwara3
8
2.1k
作るべきものと向き合う - ecspresso 8年間の開発史から学ぶ技術選定 / 技術選定con findy 2026
fujiwara3
9
5.9k
さくらのクラウドでのシークレット管理を考える/tamachi.sre#2
fujiwara3
2
390
Amazon ECS デプロイツール ecspresso の開発を支える「正しい抽象化」の探求 / YAPC::Fukuoka 2025
fujiwara3
13
14k
パフォーマンスチューニングのために普段からできること/Performance Tuning: Daily Practices
fujiwara3
9
6.9k
alecthomas/kong はいいぞ
fujiwara3
7
2.6k
ecspressoの設計思想に至る道 / sekkeinight2025
fujiwara3
12
3.8k
さくらのIaaS基盤のモニタリングとOpenTelemetry/OSC Hokkaido 2025
fujiwara3
4
5.4k
Other Decks in Technology
See All in Technology
When Does a Local Qwen Start to Break
morshoto
0
180
Beyond the Hype: Practical AI for Your Oracle Database with MCP
thatjeffsmith
1
270
WAF 運用改善の承認サイクル/SRE_BizReach_MIXI_1
visional_engineering_and_design
0
150
Guerilla InnerSource in enterprises, during the AI hype
onenashev
PRO
0
150
Hub & Spoke 環境のネットワークルーティングを分解してみる
tsuyataku
1
530
AI時代に、プロダクトの数だけ積み上がる所有コストをどうエンジニアリングするか / Engineering the Cost of Ownership
kzkmaeda
0
1k
Jetpack Compose で挑む新聞紙面UI ─ 複合ジェスチャー・ポリゴン記事領域・適応的ページ構成という3つの壁/droidkaigi2026
nikkei_engineer_recruiting
0
230
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
0
130
コスト最適化の「めんどくさい」を AWS FinOps Agent でチョット楽にする
classmethod_kaz
0
240
Where Is JetBrains AI Heading- — Central CLI, Air Alpha, and the Agentic Development Stack
x5gtrn
PRO
0
130
module Synths; end
asonas
1
120
AIに丸投げしないトイル削減 / Eliminating Toil Without Leaving It All to AI
kohbis
2
600
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.3k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
310
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
810
Into the Great Unknown - MozCon
thekraken
41
2.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Paper Plane
katiecoart
PRO
2
53k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
200
Automating Front-end Workflow
addyosmani
1369
210k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
680
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ߦʹҠಈ)