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.5k
作ってわかる現代の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
黒画面が最高のしごと道具である3つの理由
lighttiger2505
0
190
Golangで作るSQL Language Server(sqls)
lighttiger2505
1
680
Connect with many developers from the small plugin
lighttiger2505
0
280
自社サービスのDjangoを 1.3から1.11(LTS)に アップグレードするまでの道のり
lighttiger2505
6
3.3k
LSPがもたらしたVimプラグインの変化に思いを馳せる
lighttiger2505
2
1.3k
ターミナルアプリケーションとしてのVim
lighttiger2505
0
470
Go Language Server 使うべし
lighttiger2505
5
1.9k
Goで作るインタラクティブなCLIコマンドとそのデザイン
lighttiger2505
0
710
GUI is not fast enough!! (GUIには速さが足りないっ!!)
lighttiger2505
0
490
Other Decks in Programming
See All in Programming
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
1.6k
開発効率向上のためのリファクタリングの一歩目の選択肢 ~コード分割~ / JJUG CCC 2024 Fall
ryounasso
0
360
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
170
Tuning GraphQL on Rails
pyama86
2
1k
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
550
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
200
CSC509 Lecture 09
javiergs
PRO
0
110
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
430
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
7
2.8k
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
23k
CSC305 Lecture 13
javiergs
PRO
0
130
Outline View in SwiftUI
1024jp
1
120
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
Scaling GitHub
holman
458
140k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
What's new in Ruby 2.0
geeforr
342
31k
A Modern Web Designer's Workflow
chriscoyier
692
190k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
How to Ace a Technical Interview
jacobian
275
23k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
41
2.1k
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