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
141
190k
黒画面が最高のしごと道具である3つの理由
lighttiger2505
0
1.9k
Golangで作るSQL Language Server(sqls)
lighttiger2505
1
830
Connect with many developers from the small plugin
lighttiger2505
0
340
自社サービスのDjangoを 1.3から1.11(LTS)に アップグレードするまでの道のり
lighttiger2505
6
3.4k
LSPがもたらしたVimプラグインの変化に思いを馳せる
lighttiger2505
2
1.3k
ターミナルアプリケーションとしてのVim
lighttiger2505
0
530
Go Language Server 使うべし
lighttiger2505
5
2k
Goで作るインタラクティブなCLIコマンドとそのデザイン
lighttiger2505
0
770
Other Decks in Programming
See All in Programming
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
190
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
770
선언형 UI에서의 상태관리
l2hyunwoo
0
160
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
130
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
210
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
Symfony Mapper Component
soyuka
2
730
情報漏洩させないための設計
kubotak
1
140
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
470
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
How to Ace a Technical Interview
jacobian
276
23k
Done Done
chrislema
181
16k
Writing Fast Ruby
sferik
628
61k
The Invisible Side of Design
smashingmag
298
50k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
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