# 世界最強スニペットプラグイン
[[plugins]]
repo = 'cohama/lexima.vim'
on_event = ['InsertEnter', 'CmdlineEnter']
hooks_file = '$DEIN_CONFIG_DIR/lexima.vim'
# htmlっぽいやつを編集するときにdiv->
とか展開できるので便利
# emmet記法はあんま使ってない 覚えられない
[[plugins]]
repo = 'mattn/emmet-vim'
on_map = { i = '
(emmet-' }
hook_add = '''
imap , (emmet-expand-abbr)
imap ; (emmet-expand-word)
imap u (emmet-update-tag)
imap d (emmet-balance-tag-inward)
imap D (emmet-balance-tag-outward)
imap n (emmet-move-next)
imap N (emmet-move-prev)
imap i (emmet-image-size)
imap / (emmet-toggle-comment)
imap j (emmet-split-join-tag)
imap k (emmet-remove-tag)
imap a (emmet-anchorize-url)
imap A (emmet-anchorize-summary)
imap m (emmet-merge-lines)
imap c (emmet-code-pretty)
'''
# 新しいファイル開いて `:Template nanka` すると良い感じになる
[[plugins]]
repo = 'mattn/vim-sonictemplate'
merge_ftdetect = true
on_ft = 'stpl'
on_cmd = 'Template'
hook_add = '''
let g:sonictemplate_vim_template_dir = [$'{stdpath("config")}/template']
'''
hooks_file = '$DEIN_CONFIG_DIR/vim-sonictemplate.vim'
[plugins.ftplugin]
stpl = '''
setl tabstop=4
setl noexpandtab
'''
# VSCode風の書式でスニペットを定義できる
[[plugins]]
repo = 'hrsh7th/vim-vsnip'
on_func = 'vsnip#'
hook_add = '''
let g:vsnip_snippet_dir = $'{stdpath('config')}/vsnip'
let g:vsnip_filetypes = #{
\ javascriptreact: ['javascript'],
\ typescriptreact: ['typescript'],
\ }
'''