Why isn't this Vim syntax command in after/ftplugin/yaml.vim working? -
i have next line in after/ftplugin/yaml.vim
syn match yamlblockmappingkey /^\s*\zs.*\ze\s*:\%(\s\|$\)/
i have tried this:
execute 'syn match yamlblockmappingkey /^\s*\zs.*\ze\s*:\%(\s\|$\)/'
the purpose of create vim highlight keys contain spaces, per this stackoverflow question. problem command doesn't seem work when open new yaml file. know after/ftplugin/yaml.vim
beingness sourced, set echom
command in there , shows in messages
. also, if take line , paste command prompt , execute it, works. know what's up?
the ftplugin
scripts sourced before syntax scripts, default yaml syntax clears additional definition. place extension after/syntax/yaml.vim
instead; after all, you're extending syntax, not filetype settings.
vim
No comments:
Post a Comment