syntax/rspec.vim
author Mahlon E. Smith <mahlon@martini.nu>
Sat, 16 Jan 2016 11:31:53 -0800
branchvim-stuff
changeset 29 a0e6ddfadf82
parent 19 specky/syntax/rspec.vim@763cef799c74
permissions -rw-r--r--
Split vim projects into separate repos.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
     1
"
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
     2
" specky: syntax highlighting for rspec files.
19
763cef799c74 Specky: support rspec 2.x by default.
Mahlon E. Smith <mahlon@martini.nu>
parents: 17
diff changeset
     3
" This includes keywords for both rspec 1.x and rspec 2.x.
5
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
     4
" $Id$
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
     5
"
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
     6
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
     7
runtime! syntax/ruby.vim
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
     8
unlet b:current_syntax
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
     9
19
763cef799c74 Specky: support rspec 2.x by default.
Mahlon E. Smith <mahlon@martini.nu>
parents: 17
diff changeset
    10
syntax keyword rspecGroupMethods context describe example it its let it_should_behave_like shared_examples_for subject it_behaves_like pending specify
5
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    11
highlight link rspecGroupMethods Type
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    12
19
763cef799c74 Specky: support rspec 2.x by default.
Mahlon E. Smith <mahlon@martini.nu>
parents: 17
diff changeset
    13
syntax keyword rspecBeforeAndAfter after after_suite_parts append_after append_before before before_suite_parts prepend_after prepend_before around
5
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    14
highlight link rspecBeforeAndAfter Statement
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    15
19
763cef799c74 Specky: support rspec 2.x by default.
Mahlon E. Smith <mahlon@martini.nu>
parents: 17
diff changeset
    16
syntax keyword rspecMocks double mock stub stub_chain
5
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    17
highlight link rspecMocks Constant
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    18
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    19
syntax keyword rspecMockMethods and_raise and_return and_throw and_yield build_child called_max_times expected_args invoke matches
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    20
highlight link rspecMockMethods Function
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    21
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    22
syntax keyword rspecKeywords should should_not should_not_receive should_receive
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    23
highlight link rspecKeywords Constant
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    24
19
763cef799c74 Specky: support rspec 2.x by default.
Mahlon E. Smith <mahlon@martini.nu>
parents: 17
diff changeset
    25
syntax keyword rspecMatchers be change eql equal exist expect have have_at_least have_at_most have_exactly include match matcher raise_error raise_exception respond_to satisfy throw_symbol to to_not when wrap_expectation
763cef799c74 Specky: support rspec 2.x by default.
Mahlon E. Smith <mahlon@martini.nu>
parents: 17
diff changeset
    26
syntax match rspecMatchers /\<\(be\|have\)_\w\+\>/
5
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    27
highlight link rspecMatchers Function
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    28
19
763cef799c74 Specky: support rspec 2.x by default.
Mahlon E. Smith <mahlon@martini.nu>
parents: 17
diff changeset
    29
syntax keyword rspecMessageExpectation advise any_args any_number_of_times anything at_least at_most exactly expected_messages_received generate_error hash_including hash_not_including ignoring_args instance_of matches_at_least_count matches_at_most_count matches_exact_count matches_name_but_not_args negative_expectation_for never no_args once ordered similar_messages times twice verify_messages_received with 
5
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    30
highlight link rspecMessageExpectation Function
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    31
3346aa8d5364 Add snippets and rspec syntax highlights.
mahlon
parents:
diff changeset
    32
let b:current_syntax = "rspec"
17
54598f9f279c Add some syntax keywords for rspec 1.3.0.
Mahlon E. Smith <mahlon@martini.nu>
parents: 12
diff changeset
    33