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
作るべきものと向き合う - ecspresso 8年間の開発史から学ぶ技術選定 / 技術選定con findy 2026
fujiwara3
9
4.7k
さくらのクラウドでのシークレット管理を考える/tamachi.sre#2
fujiwara3
2
340
Amazon ECS デプロイツール ecspresso の開発を支える「正しい抽象化」の探求 / YAPC::Fukuoka 2025
fujiwara3
13
12k
パフォーマンスチューニングのために普段からできること/Performance Tuning: Daily Practices
fujiwara3
9
6.7k
alecthomas/kong はいいぞ
fujiwara3
7
2.5k
ecspressoの設計思想に至る道 / sekkeinight2025
fujiwara3
12
3.7k
さくらのIaaS基盤のモニタリングとOpenTelemetry/OSC Hokkaido 2025
fujiwara3
3
4.3k
監視のこれまでとこれから/sakura monitoring seminar 2025
fujiwara3
12
5.8k
k6による負荷試験 入門から日常的な実践まで/Re:TechTalk #01
fujiwara3
2
610
Other Decks in Technology
See All in Technology
200個のGitHubリポジトリを横断調査したかった
icck
0
130
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.5k
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
2k
日本 Fintech 未来予測レポート 2027〜2028年(手動編集版)
8maki
0
2.4k
AIっぽい文章を採点して人間らしく直すアプリを作ってみた
yama3133
2
200
スキルと MCP ツール、責務をどう分けるか? AI が迷わないインターフェース設計の戦略
cdataj
1
1.1k
人材育成分科会.pdf
_awache
4
280
Kiroで書いた 設計書 が AI レビューの 採点基準 になる
ezaki
0
120
白金鉱業Meetup_Vol.24_「AIエージェントは分けるほど良い」は本当か? / Is it true that “the more you divide AI agents, the better”?
brainpadpr
1
400
いまさら聞けない「仕様駆動開発入門」 〜AI活用時代の開発プロセスを考える〜
findy_eventslides
2
150
手塩にかけりゃいいってもんじゃない
ming_ayami
0
600
機械学習を「社会実装」するということ 2026年夏版 / Social Implementation of Machine Learning June 2026 Version
moepy_stats
6
2.4k
Featured
See All Featured
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
Deep Space Network (abreviated)
tonyrice
0
170
Navigating Team Friction
lara
192
16k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
250
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
Marketing to machines
jonoalderson
1
5.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Building Applications with DynamoDB
mza
96
7.1k
Tell your own story through comics
letsgokoyo
1
950
A designer walks into a library…
pauljervisheath
211
24k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
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ߦʹҠಈ)