![Page 1: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/1.jpg)
Neosnippet.vim + Deoppet.nvim VimConf 2017
Shougo@ShougoMatsu
![Page 2: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/2.jpg)
Profile● Shougo● The dark powered Vim user 暗黒美無王
(Uncock Vim Awe, The dark Vim maestro)● The text editor is the world● My icon is not zebra!
![Page 3: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/3.jpg)
The dark powered plugins● deoplete.nvim: The next completion plugin for neovim
● deol.nvim: The next terminal plugin for neovim/Vim8
● dein.vim: The next plugin manager for neovim/Vim8
● denite.nvim: The next UI plugin for neovim/Vim8
● deoppet.nvim: The next snippet plugin for neovim (vaporware)
● defx.nvim: The next file manager for neovim/Vim8 (vaporware)
● deorise.nvim: The next hexadecimal editor plugin for neovim/Vim8 (vaporware)
![Page 4: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/4.jpg)
Today's theme● The snippet plugins● neosnippet.vim● deoppet.nvim● The extra thing
Note:No songs
![Page 5: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/5.jpg)
The snippet plugins
![Page 6: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/6.jpg)
What is the snippet plugin?● It expands the snippet trigger
Ex: i f → if () {}● And jumps the next places(place holder)
Ex: i f (${1}) { ${2} }● You don’t have to insert the texts and move to the next
position manually● The similar plugins: The template plugin, emmet-vim
![Page 7: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/7.jpg)
neosnippet.vimhttps://github.com/Shougo/neosnippet.vim
● The neo-snippet plugin● The marker type snippet plugin● Popular in Japan● Compatible with snipMate syntax● Integrated with the completion plugins● Vim script based
![Page 8: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/8.jpg)
snipMatehttps://github.com/garbas/vim-snipmate
● Easy to read syntax● Very popular● The development seems slowly● The non-marker type snippet plugin● Vim script based
![Page 9: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/9.jpg)
UltiSnipshttps://github.com/Silver/ultisnips
● Non compatible syntax with snipMate● Popular● Many features● The non-marker type snippet plugin● if_python/if_python3 based● Slow performance in neovim
![Page 10: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/10.jpg)
What is the marker type snippet plugin?
● It adds the markers to the buffer to detect the next jump places
Ex: <`1`> ● It is easy to implement● No performance problem● Easy to find the next jump places
![Page 11: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/11.jpg)
What is the non marker type snippet plugin?
● It monitors the buffer changes to find the next jump position
● The implementation is complex● It is easy to implement jump back feature
![Page 12: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/12.jpg)
Neosnippet.vim
![Page 13: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/13.jpg)
The history of neosnippet.vim
● I don't understand why the snippet plugins are useful● I have created the snippet plugin as builtin
neocomplcache source● The snippet plugin is very huge... → neosnippet.vim● The default snippets are very huge and not easy to
customize for the users → neosnippet-snippets
![Page 14: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/14.jpg)
neosnippet.vim disadvantages
● Conflicts with conceal feature● Hard to implement jump back feature● It changes the buffer● The slow parser (Vim script performance problem)● It is hard to extend…
![Page 15: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/15.jpg)
Deoppet.nvim
![Page 16: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/16.jpg)
deoppet.nvimhttps://github.com/Shougo/deoppet.nvim
● The dark powered neo snippet plugin● Compatible syntax with neosnippet.vim● The non-marker type snippet plugin● It depends on Extended Marks feature in neovim
https://github.com/neovim/neovim/pull/5031● neovim only● Python3 based, almost 300 lines
![Page 17: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/17.jpg)
Extended marks feature● It detects the buffer changes automatically● The plugins don’t have to detect the buffer changes● And it has the namespaces
let ns = nvim_init_mark_ns(‘deoppet’)
let id = nvim_buf_set_marks(bufnr, ns, ‘’, row, col)
![Page 18: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/18.jpg)
Current development status● Works the simple neosnippet syntax parser● Can expand the snippet trigger● The Completion by deoplete● Can Jump forward/jump back to the placeholders● It is hard to try...
![Page 19: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/19.jpg)
Current development status● Works the simple neosnippet syntax parser● Can expand the snippet trigger● The Completion by deoplete● Can Jump forward/jump back to the placeholders● It is hard to try...
![Page 20: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/20.jpg)
The demo of deoppet.nvim
![Page 21: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/21.jpg)
The extra thing
![Page 22: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/22.jpg)
The extra thing● neocomplete.vim development is over● Because deoplete.nvim supports Vim8● You can try it● Enjoy!
![Page 23: Neosnippet.vim + Deoppet.nvim in Vim conf 2017](https://reader034.vdocuments.site/reader034/viewer/2022050613/5a64a6f37f8b9a31568b5d67/html5/thumbnails/23.jpg)
Thank you!