dotfiles/editors/vim/after/syntax/ruby.vim

16 lines
569 B
VimL
Raw Normal View History

2019-07-22 16:21:32 +10:00
if expand('%') =~# '_spec\.rb$'
syn keyword rubyRspec describe context it specify it_should_behave_like before after setup subject let shared_context shared_examples_for shared_examples
endif
2019-07-22 16:21:32 +10:00
hi def link rubyRspec Function
2019-07-22 16:21:32 +10:00
nmap <silent> <Leader>rf mr:set foldmethod=syntax<CR>zMzv?\v^\s*(it\|example)<CR>zz:noh<CR>`r:delmarks r<CR>
let s:bcs = b:current_syntax
unlet b:current_syntax
syntax include @SQL syntax/sql.vim
let b:current_syntax = s:bcs
syntax region hereDocDashSQL matchgroup=Statement start=+<<[-~.]\?\z(SQL\%(DOC\)\?\)+ end=+^\s*\z1+ contains=@SQL