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
作ってわかる現代のVimのAutoComplete ~そしてVimConf2019へ~
Search
Toshikazu Ohashi
October 24, 2019
Programming
3
1.6k
作ってわかる現代のVimのAutoComplete ~そしてVimConf2019へ~
ゴリラ.vim #9
https://gorillavim.connpass.com/event/149797/
Toshikazu Ohashi
October 24, 2019
Tweet
Share
More Decks by Toshikazu Ohashi
See All by Toshikazu Ohashi
無自覚にメンバーの心理的安全性を奪っていた経験から得た学び
lighttiger2505
155
210k
黒画面が最高のしごと道具である3つの理由
lighttiger2505
0
2.1k
Golangで作るSQL Language Server(sqls)
lighttiger2505
1
870
Connect with many developers from the small plugin
lighttiger2505
0
370
自社サービスのDjangoを 1.3から1.11(LTS)に アップグレードするまでの道のり
lighttiger2505
6
3.5k
LSPがもたらしたVimプラグインの変化に思いを馳せる
lighttiger2505
2
1.4k
ターミナルアプリケーションとしてのVim
lighttiger2505
0
550
Go Language Server 使うべし
lighttiger2505
5
2k
Goで作るインタラクティブなCLIコマンドとそのデザイン
lighttiger2505
0
830
Other Decks in Programming
See All in Programming
Modern Angular:Renovation for Your Applications @angularDays 2025 Munich
manfredsteyer
PRO
0
140
研究開発と実装OSSと プロダクトの好循環 / A virtuous cycle of research and development implementation OSS and products
linyows
1
190
Node.js, Deno, Bun 最新動向とその所感について
yosuke_furukawa
PRO
6
3k
PHPでお金を扱う時、終わりのない 謎の1円調査の旅にでなくて済む方法
nakka
3
1.2k
List とは何か? / PHPerKaigi 2025
meihei3
0
550
Windows版PHPのビルド手順とPHP 8.4における変更点
matsuo_atsushi
0
370
安全に倒し切るリリースをするために:15年来レガシーシステムのフルリプレイス挑戦記
sakuraikotone
5
2.3k
GDG Super.init(version=6) - From Where to Wear : 모바일 개발자가 워치에서 발견한 인사이트
haeti2
0
560
英語文法から学ぶ、クリーンな設計の秘訣
newnomad
1
270
Go1.24で testing.B.Loopが爆誕
kuro_kurorrr
0
160
本当だってば!俺もTRICK 2022に入賞してたんだってば!
jinroq
0
250
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
110
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Speed Design
sergeychernyshev
28
860
Being A Developer After 40
akosma
90
590k
The Pragmatic Product Professional
lauravandoore
33
6.5k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Building a Modern Day E-commerce SEO Strategy
aleyda
39
7.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
25k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Designing for Performance
lara
606
69k
Transcript
࡞ͬͯΘ͔Δ ݱͷVimͷAutoComplete ~ͦͯ͠VimConf2019~ gorilla.vim #9 @lighttiger2505
ࣗݾհ • lighttiger2505(Toshikazu Ohashi) • αʔόαΠυΤϯδχΞ@iRidge • Vimྺ3͘Β͍ • झຯ
• CLIίϚϯυͱVim͍͡Γ
AutoCompleteͯ͠·͔͢ʁ
AutoComplete͕ Ͳ͏ಈ͘ͷ͔ؾʹͳͬͯ Ε·ͤΜ͔ʁ
ΞδΣϯμ • [ΠϯτϩμΫγϣϯ] Auto Completeͱʁ • Auto CompleteΛ࡞ͬͯΈΑ͏ • ݱͷVimͷAuto
Completeͱ • એ
AutoCompleteͱʁ
AutoCompleteͱ • Ϣʔβ͕ΤσΟλʹೖྗͨ͠༰ʹԠͯ͡ Ϛον͢ΔީิΛҰཡදࣔ͠ɺೖྗΛิॿ͢ Δػೳ
ͳ͓Vimʹ(खಈ)ิ͕͋Δ • `:help ins-completion` • `CTRL-X`Λىʹ༷ʑͳछྨͷิ͕͋Δ • ϑΝΠϧͷΩʔϫʔυิ • ΦϜχิ
VimConf2018Ͱൃද͞Εͨ ࢀߟʹͳΔεϥΠυ • https://speakerdeck.com/daisuzu/migrating- plugins-to-standard-features
VimͷAutoComplete ϓϥάΠϯʹΑ࣮ͬͯݱ • ϓϥάΠϯͰ࣮ݱͰ͖Δͱ͍͏͜ͱ • ΠίʔϧࣗͰ࡞ΕΔ • ࡞ͬͯΈΑ͏
AutoCompleteΛ ࡞ͬͯΈΑ͏
ຊεςοϓͷΰʔϧ • lookcomplete.nvim
શ̒εςοϓͰ࡞ 1. ࠷খͷิ 2. ิͷڍಈΛௐ 3. ࣗಈͰิ 4. ӳ୯ޠΛิ 5.
ඇಉظͰิީิΛऔಘ 6. ίʔϧόοΫͷνΣοΫ
ຊσϞͰར༻͢Δίʔυ • GitHubͰެ։͞Ε͍ͯ·͢ • https://github.com/lighttiger2505/ lookcomplete.nvim
1. ࠷খͷิ • `:help complete` • ࠐΈؔͰิީิΛදࣔ
2. ิͷڍಈΛௐ • F5Λ͓ͨ͠ॠؒʹิީิ͕Πϯαʔτ • `:help completeopt`Λมߋ • ೖྗࡁΈ༰ʹॏෳͯ͠ૠೖ •
`complete`ͷ`startcol`Λࢦఆ
3. ࣗಈͰิ • `TextChangedI`͝ͱʹpumΛߋ৽ • `InsertEnter/Leave`ͰΧʔιϧߦΛอ࣋ • ΠϯαʔτϞʔυʹͳͬͨॠؒʹදࣔ͞ΕΔ • ೖྗ͕ͳ͍߹ʹީิදࣔΛແޮԽ
4. ӳ୯ޠΛิ • lookίϚϯυ
5. ඇಉظͰิީิΛऔಘ • lookίϚϯυ࣮ߦதVim͕ϒϩοΫ • `:help jobstart(in NeoVim)`
6. ίʔϧόοΫͷνΣοΫ • lookίϚϯυ͕͔ͬͨ߹͓͔͠ͳڍಈ • lookίϚϯυͷίʔϧͨ͠ঢ়گ(Context)ͱ ิදࣔͷঢ়گͱҰகͨ͠ͱ͖͚ͩදࣔ
࡞ͬͯΘ͔ͬͨAutoComplete • ΤσΟλͷ֩Ͱ͋ΔςΩετมߋΛϑοΫ͢ ΔͷͰɺͷ͘͢͝ؾΛ͔ͭ͏ • Ϣʔβ͕৺ྑ͍λΠϛϯάͰิΛग़͢ • ࡉ͔͍ௐ/νΣοΫॲཧ͕ෆՄܽ
࡞ͬͯΘ͔ͬͨAutoComplete • ςΩετฤूΛϒϩοΫͯ͠ͳΒͳ͍ • ߴॲཧɺඇಉظॲཧ͕ඞਢ
ݱͷVimͷ AutoCompleteͱ
Αࣗ͠AutoComplete ϓϥΪϯΛ࡞Ζ͏ʂ • ͪΐͬͱ·ͬͯ • ଞͷAutoCompleteͱׯব • ϓϥάΠϯ͝ͱʹॏෳͨ͠ॲཧ • VimͷΠϕϯτϑοΫ/ίϯςΩετऔಘ/֤छνΣοΫ
• ඇಉظιʔεऔಘͷࠔ͞ • VimͱNeoVimͷ྆ରԠͭΒͦ͏...
Completion Manager • ΠϕϯττϥοΩϯά͔Βิιʔεऔಘɺ ϙοϓΞοϓ੍ޚͳͲΛߦ͏ิϑϨʔϜϫʔ Ϋ
Completion Manager • ίΞͷิػೳͱิιʔεΛΠϯλϑΣʔ εܦ༝Ͱૄ݁߹ʹ • ิιʔεΛϓϥάΠϯՄೳ͔ͭݸผ։ൃ͕ Մೳ • ิιʔε։ൃऀΠϯλϑΣʔεʹै͑
ൺֱత؆୯ʹߴͳิͷԸܙΛड͚Δ
Completion Managerͷߏ $PNQMFUJPO.BOBHFS 4PVSDF ΠϕϯττϥοΩϯά ิιʔεґཔ ิީิදࣔ ิιʔεऔಘ ิιʔε ίʔϧόοΫ
BTZOD DUY
۩ମྫ • deoplete.nvim • https://github.com/Shougo/deoplete.nvim/wiki/Completion- Sources • asyncomplete.vim • https://github.com/prabirshrestha/
asyncomplete.vim#sources • coc.nvim • https://github.com/neoclide/coc.nvim#completion-sources
Completion ManagerͰ շదͳੜ׆Λ
એ
2019/11/03
None
Keynote speaker • Prabir Shrestha • asyncomplete.vim • lookcomplete.nvim΄΅͜Εͷ؆қ൛ •
async.vim • vim-lsp
Speaker • Shougo(҉ࠇඒແԦ) • deoplete.nvim • Completion Manager࠷ڧͷ֦ுੑ • ϦϞʔτϓϥάΠϯͷද֨
Keynote speaker • Justin M. Keyes • NeoVim • Ϧʔυϝϯςφʔ
Lightning Talk • lighttiger2505 • deoplete-vim-lsp • deoplete.vimͱvim-lspʹ͓ΜͿʹͩͬ͜
Let's enjoy VimConf2019