Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ターミナルアプリケーションとしてのVim
Search
Toshikazu Ohashi
March 11, 2019
Programming
650
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ターミナルアプリケーションとしてのVim
ゴリラ.vim #2
https://gorillavim.connpass.com/event/121394/
Toshikazu Ohashi
March 11, 2019
More Decks by Toshikazu Ohashi
See All by Toshikazu Ohashi
無自覚にメンバーの心理的安全性を奪っていた経験から得た学び
lighttiger2505
163
220k
黒画面が最高のしごと道具である3つの理由
lighttiger2505
0
2.3k
Golangで作るSQL Language Server(sqls)
lighttiger2505
1
1k
Connect with many developers from the small plugin
lighttiger2505
0
480
作ってわかる現代のVimのAutoComplete ~そしてVimConf2019へ~
lighttiger2505
3
1.9k
自社サービスのDjangoを 1.3から1.11(LTS)に アップグレードするまでの道のり
lighttiger2505
6
3.8k
LSPがもたらしたVimプラグインの変化に思いを馳せる
lighttiger2505
2
1.6k
Go Language Server 使うべし
lighttiger2505
5
2.2k
Goで作るインタラクティブなCLIコマンドとそのデザイン
lighttiger2505
0
1.1k
Other Decks in Programming
See All in Programming
SREの越境 / SRE Collaboration
y0hgi
2
300
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
510
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
21
21k
速習iPhone Duo対応
yuukiw00w
2
970
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2k
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.6k
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
260
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.5k
GitHubハンズオン講座 — 実務レベルのチーム開発のフローを身につけよう
junhat6
0
120
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
140
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
330
A better future with KSS
kneath
240
18k
Speed Design
sergeychernyshev
33
2.1k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
590
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
530
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
520
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Transcript
λʔϛφϧ ΞϓϦέʔγϣϯ ͱͯ͠ͷ 7JN ΰϦϥWJN !MJHIUUJHFS
ΠϯτϩμΫγϣϯ
7JNͷྑ͞ͱ͍͑ʁ • λʔϛφϧͷதͰىಈ͢Δ • ϞʔυʹΑΔҠಈ/ฤू͕ͱͬͯศར • VimscriptʹΑΔ֦ுੑͷߴ͞ • ىಈͷ͞ •
େମͷαʔόϚγϯͰΠϯετʔϧࡁΈ
ຊͷςʔϚ • λʔϛφϧͷதͰىಈ͢Δ • ϞʔυʹΑΔҠಈ/ฤू͕ͱͬͯศར • VimscriptʹΑΔ֦ுੑͷߴ͞ • ىಈͷ͞ •
େମͷαʔόϚγϯͰΠϯετʔϧࡁΈ
λʔϛφϧͰىಈ͢Δྑ͞ ͱ͍͑ʁ • αʔόϚγϯͩͱͦͦGUIΤσΟλ͕͑ͳ͍ • ଞͷίϚϯυ͔Βͷ࿈ܞ͕εϜʔζʹߦ͑Δ
ຊ͢༰ • αʔόϚγϯͩͱͦͦGUIΤσΟλ͕͑ͳ͍ • ଞͷίϚϯυ͔Βͷ࿈ܞ͕εϜʔζʹߦ͑Δ
ίϚϯυ͔Β7JNΛίʔϧ ͢Δͱ͍͏͜ͱ
7JNΛίʔϧ͢ΔίϚϯυͱ • crontab -e • git commit • etc... ࣮ߦ͢ΔͱΤσΟλ(Vimͱ͔)Λىಈͯ͠ϑΝΠϧΛ։͘->
อଘͯ͠ดͨ͡ͱ͖ɺฤू݁ՌΛύʔεͯ͠͏ίϚϯυ
%FNP • git commit • SQL client(mysql, psql, etc)
౾ࣝ git commit ͱ͔ git rebase -i Ωϟϯηϧ͍ͨ͠Μ Ͱ͚͢Ͳ •
:cq ͠·͠ΐ͏ • ฤू༰Λഁغͯ͠ΤϥʔίʔυΛฦ͠·͢
ڥม&%*503
7JNͰ͔͠։͔ͳ͍ʁ • ΤσΟλΛ։͘ίϚϯυଟ͘ͷ߹EDITORʹઃఆ͞ Ε͍ͯΔίϚϯυΛ࣮ߦ͢Δ • export EDITOR=vim ͩͱVimΛىಈ͢Δ • ׳शͱͯ͠ͷ͜͏ͳ͍ͬͯΔ͚ͩͳͷͰɺEDITORΛ
༻͠ͳ͍ίϚϯυ͋Δ
74$PEFΛىಈ͍ͨ͠ • ୯७ʹ export EDITOR=code ͩͱବ • ىಈޙϓϩηε͕ৗற͢ΔλΠϓͷΤσΟλͩͱฤू ྃΛͨͳ͍ •
ϑΝΠϧ։͍ͯଈ࠲ʹίϚϯυͱͯ͠ऴΘΔ • export EDITOR='code --wait' • --waitΛ͚ͭΔ͜ͱͰฤूྃ·ͰͭΑ͏ʹͳΔ
%FNP • git commit on vscode
74$PEFͰ͍͍ͷͰʁ • (ྲྀੴʹVimʹൺΔͱ)ىಈ͕͍ • λʔϛφϧʹΔ·Ͱʹϫϯεςοϓඞཁ • VimͳΒ :wq ͰΔ •
VSCodeͳΒ อଘͯ͠ด͡Δ > λʔϛφϧʹΔ
͜͜·Ͱͷ·ͱΊ • λʔϛφϧ্ͰίϚϯυ͔ΒVimΛݺͼग़͢ͷศར • ىಈ૬·ͬͯɺίϚϯυ͔Βίʔϧ͞ΕΔΤσΟ λͱͯ͠VimʹΞυόϯςʔδ͕͋Δͱࢥ͍ͬͯΔ
͖ΈWJNEJ⒎Λ ͍ͬͯ͠Δ͔
WJNEJ⒎ͱ Vimʹଂ͞Ε͍ͯΔࠩදࣔ/Ϛʔδπʔϧ • vimdiff file1 file2 [file3 [file4]] • vim
-d file1 file2 [file3 [file4]]
%FNP • vimdiff
(JU࿈ܞ
(JU WJNEJ⒎ • git difftool ͰࠩใΛ֎෦πʔϧʹ࿈ܞ͢Δ͜ͱ ͕Ͱ͖Δ • GitͷࠩΛVim্ͰݟΔ͜ͱ͕Ͱ͖Δ •
git mergetool ͰίϯϑϦΫτใΛ֎෦πʔϧʹ࿈ ܞ͢Δ͜ͱ͕Ͱ͖Δ • GitͷίϯϑϦΫτΛVimͰղফ͢Δ͜ͱ͕Ͱ͖Δ
(JUͷEJ⒎UPPMʹ7JNΛ͏ • ҎԼͷઃఆΛ~/.gitconfigʹՃ͢Δ͜ͱͰvimdiff ΛGitͷdifftoolͳ͍͠mergetoolͱͯ͠ొͰ͖Δ [diff] tool = vimdiff [merge] tool
= vimdiff
Ԡ༻ฤ5JH࿈ܞ
5JHͱ • λʔϛφϧ্ͰGitΛϦονʹදࣔ͢ΔTUIΞϓϦ • ઃఆϑΝΠϧ(~/.tigrc)ͰڍಈΛΧελϚΠζͰ͖Δ • ҎԼͷઃఆΛೖΕΔ͜ͱͰɺtigͰબͨ͠diffΛ vimdiffͰݟΔ͜ͱ͕Ͱ͖Δ bind main
D !sh -c "git difftool %(commit)~ %(commit)" bind diff D !sh -c "git difftool %(commit)~ %(commit)" bind refs D !sh -c "git difftool %(branch)"
%FNP • tig & git difftool
/FP7JNͷWJNEJ⒎
/FP7JNͷWJNEJ⒎ •vimdiffͱ͍͏ίϚϯυVimͷγϯϘϦοΫϦϯΫ •NeoVimΠϯετʔϧࡁΈͰvimdiffΛୟ͘ͱVim͕ىಈ •NeoVimͷࠩϞʔυΛvimdiffͰ࣮ߦ͢Δ߹ɺҎԼͷ ΤΠϦΞεઃఆ͕ඞཁ alias vimdiff='nvim -d'
/FP7JNͷHJU<EJ⒎NFSHF>UPPM • git [diff/merge]toolΤΠϦΞεΛݟͳ͍ • NeoVimͷvimdiffΛ͏߹ɺ~/.gitconfigʹҎԼ ͷઃఆ͕ඞཁ [difftool "vimdiff"] cmd
= "nvim -R -d -c \"wincmd l\" -d \"$LOCAL\" \"$REMOTE\"" [mergetool "vimdiff"] cmd = "nvim -d -c \"4wincmd w | wincmd J\" \"$LOCAL\" \"$BASE\" \"$REMOTE\" \"$MERGED\""
࠷ޙʹ
ࠓ͔͑ͨͬͨϝοηʔδ • Vim͕ϑΟοτ͢Δൣғ෯͍ • ϝϞॻ͖ͷΑ͏ͳͪΐͬͱͨ͠ฤू • IDEͷΑ͏ͳॏ͍ฤू • VimΛىಈͯ͠Ӡʑ͚ͩͰͳ͘ɺ֎෦͔ΒVimΛىಈ͢Δ ͱͤͳ͜ͱ͕͋Δύλʔϯ͋Δ
7JNͦΕՄೳੑͷ्
ࣗݾհ lighttiger2505 •αʔόαΠυΤϯδχΞ@iRidge •ࣄ:Python •झຯ:Golang࣌ʑVimscript •lab •deoplete-vim-lsp