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
200
Golangで作るSQL Language Server(sqls)
lighttiger2505
1
680
Connect with many developers from the small plugin
lighttiger2505
0
290
自社サービスの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
720
GUI is not fast enough!! (GUIには速さが足りないっ!!)
lighttiger2505
0
500
Other Decks in Programming
See All in Programming
RubyLSPのマルチバイト文字対応
notfounds
0
120
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Functional Event Sourcing using Sekiban
tomohisa
0
100
Outline View in SwiftUI
1024jp
1
340
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
3
1.2k
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
940
as(型アサーション)を書く前にできること
marokanatani
10
2.7k
ヤプリ新卒SREの オンボーディング
masaki12
0
130
Jakarta EE meets AI
ivargrimstad
0
710
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
イベント駆動で成長して委員会
happymana
1
340
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Adopting Sorbet at Scale
ufuk
73
9.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
RailsConf 2023
tenderlove
29
900
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
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