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
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
alecthomas/kong はいいぞ
fujiwara3
6
1.8k
ecspressoの設計思想に至る道 / sekkeinight2025
fujiwara3
12
2.9k
さくらのIaaS基盤のモニタリングとOpenTelemetry/OSC Hokkaido 2025
fujiwara3
3
1.3k
監視のこれまでとこれから/sakura monitoring seminar 2025
fujiwara3
11
5.3k
k6による負荷試験 入門から日常的な実践まで/Re:TechTalk #01
fujiwara3
2
160
困難を「一般解」で解く
fujiwara3
10
3.8k
「隙間家具OSS」に至る道/Fujiwara Tech Conference 2025
fujiwara3
7
13k
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
1.2k
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
11
1.4k
Other Decks in Technology
See All in Technology
ソースを読むプロセスの例
sat
PRO
15
9.4k
Implementing and Evaluating a High-Level Language with WasmGC and the Wasm Component Model: Scala’s Case
tanishiking
0
150
OSSで50の競合と戦うためにやったこと
yamadashy
1
150
今この時代に技術とどう向き合うべきか
gree_tech
PRO
2
2.1k
「れきちず」のこれまでとこれから - 誰にでもわかりやすい歴史地図を目指して / FOSS4G 2025 Japan
hjmkth
1
330
Claude Code Subagents 再入門 ~cc-sddの実装で学んだこと~
gotalab555
10
17k
AI Agent Dojo #2 watsonx Orchestrateフローの作成
oniak3ibm
PRO
0
130
生成AI時代のセキュアコーディングとDevSecOps
yuriemori
0
140
20251014_Pythonを実務で徹底的に使いこなした話
ippei0923
0
220
LLMアプリの地上戦開発計画と運用実践 / 2025.10.15 GPU UNITE 2025
smiyawaki0820
1
670
Node.js 2025: What's new and what's next
ruyadorno
0
650
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
43k
Featured
See All Featured
Gamification - CAS2011
davidbonilla
81
5.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
A Tale of Four Properties
chriscoyier
161
23k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
How to Ace a Technical Interview
jacobian
280
24k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
980
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Become a Pro
speakerdeck
PRO
29
5.6k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
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ߦʹҠಈ)