Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add additional syntax file for |vspec-commands|.- |:Should|: Provide expression completion for convenience.- Improve minor stuffs.
- Loading branch information
1 parent
e241eaa
commit 484aa52
Showing
10 changed files
with
205 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
all_files_in_repos := Makefile autoload/vspec.vim bin/vspec doc/vspec.txt test/context.expected test/context.input test/custom-matcher.expected test/custom-matcher.input test/no-test.expected test/no-test.input test/tools.expected test/tools.input test/typical-content.expected test/typical-content.input | ||
all_files_in_repos := Makefile after/syntax/vim/vspec.vim autoload/vspec.vim bin/vspec doc/vspec.txt test/context.expected test/context.input test/custom-matcher.expected test/custom-matcher.input test/no-test.expected test/no-test.input test/syntax.expected test/syntax.input test/tools.expected test/tools.input test/typical-content.expected test/typical-content.input | ||
current_branch := master | ||
origin_name := origin | ||
origin_uri := ../. | ||
repos_name := vim-vspec | ||
version := 0.0.3 | ||
version := 0.0.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
" Vim additional syntax: vim/vspec - highlight vspec commands | ||
" Version: 0.0.4 | ||
" Copyright (C) 2010 kana <http://whileimautomaton.net/> | ||
" License: So-called MIT/X license {{{ | ||
" Permission is hereby granted, free of charge, to any person obtaining | ||
" a copy of this software and associated documentation files (the | ||
" "Software"), to deal in the Software without restriction, including | ||
" without limitation the rights to use, copy, modify, merge, publish, | ||
" distribute, sublicense, and/or sell copies of the Software, and to | ||
" permit persons to whom the Software is furnished to do so, subject to | ||
" the following conditions: | ||
" | ||
" The above copyright notice and this permission notice shall be included | ||
" in all copies or substantial portions of the Software. | ||
" | ||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
" }}} | ||
|
||
syntax keyword vimVspecCommand It skipwhite nextgroup=vimVspecItArgument | ||
syntax keyword vimVspecCommand ResetContext | ||
syntax keyword vimVspecCommand SaveContext | ||
syntax keyword vimVspecCommand Should skipwhite nextgroup=vimFunc,vimString | ||
|
||
syntax match vimVspecItArgument /\S.*$/ contained | ||
|
||
|
||
|
||
|
||
highlight default link vimVspecCommand vimCommand | ||
highlight default link vimVspecItArgument String | ||
|
||
" __END__ | ||
" vim: foldmethod=marker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
==== highlighting | ||
---- It should highlight :It properly. | ||
......................... | ||
---- It should highlight :Should properly. | ||
................................... | ||
|
||
|
||
|
||
**** Result **** | ||
|
||
|
||
60 examples, 0 failures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
" Common set up "{{{1 | ||
|
||
silent filetype plugin on | ||
syntax enable | ||
|
||
function! SynStack(lnum, col) | ||
return map(synstack(a:lnum, a:col), 'synIDattr(v:val, "name")') | ||
endfunction | ||
|
||
|
||
|
||
|
||
function! s:describe__highlighting() "{{{1 | ||
tabnew | ||
tabonly! | ||
|
||
silent put =[ | ||
\ 'It should be highlighted.', | ||
\ 'Should 123 be true', | ||
\ 'Should string('''') ==# ''''', | ||
\ ] | ||
1 delete _ | ||
|
||
setfiletype vim | ||
|
||
It should highlight :It properly. | ||
|
||
Should SynStack(1, 1) ==# ['vimVspecCommand'] | ||
Should SynStack(1, 2) ==# ['vimVspecCommand'] | ||
Should SynStack(1, 3) ==# [] | ||
Should SynStack(1, 4) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 5) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 6) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 7) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 8) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 9) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 10) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 11) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 12) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 13) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 14) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 15) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 16) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 17) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 18) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 19) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 20) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 21) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 22) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 23) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 24) ==# ['vimVspecItArgument'] | ||
Should SynStack(1, 25) ==# ['vimVspecItArgument'] | ||
|
||
It should highlight :Should properly. | ||
|
||
Should SynStack(2, 1) ==# ['vimVspecCommand'] | ||
Should SynStack(2, 2) ==# ['vimVspecCommand'] | ||
Should SynStack(2, 3) ==# ['vimVspecCommand'] | ||
Should SynStack(2, 4) ==# ['vimVspecCommand'] | ||
Should SynStack(2, 5) ==# ['vimVspecCommand'] | ||
Should SynStack(2, 6) ==# ['vimVspecCommand'] | ||
Should SynStack(2, 7) ==# [] | ||
Should SynStack(2, 8) ==# ['vimNumber'] | ||
Should SynStack(2, 9) ==# ['vimNumber'] | ||
Should SynStack(2, 10) ==# ['vimNumber'] | ||
Should SynStack(2, 11) ==# [] | ||
" Should SynStack(2, 12) ==# [] | ||
" Should SynStack(2, 13) ==# [] | ||
" Should SynStack(2, 14) ==# [] | ||
" Should SynStack(2, 15) ==# [] | ||
" Should SynStack(2, 16) ==# [] | ||
" Should SynStack(2, 17) ==# [] | ||
" Should SynStack(2, 18) ==# [] | ||
|
||
Should SynStack(3, 1) ==# ['vimVspecCommand'] | ||
Should SynStack(3, 2) ==# ['vimVspecCommand'] | ||
Should SynStack(3, 3) ==# ['vimVspecCommand'] | ||
Should SynStack(3, 4) ==# ['vimVspecCommand'] | ||
Should SynStack(3, 5) ==# ['vimVspecCommand'] | ||
Should SynStack(3, 6) ==# ['vimVspecCommand'] | ||
Should SynStack(3, 7) ==# [] | ||
Should SynStack(3, 8) ==# ['vimFunc', 'vimFuncName'] | ||
Should SynStack(3, 9) ==# ['vimFunc', 'vimFuncName'] | ||
Should SynStack(3, 10) ==# ['vimFunc', 'vimFuncName'] | ||
Should SynStack(3, 11) ==# ['vimFunc', 'vimFuncName'] | ||
Should SynStack(3, 12) ==# ['vimFunc', 'vimFuncName'] | ||
Should SynStack(3, 13) ==# ['vimFunc', 'vimFuncName'] | ||
Should SynStack(3, 14) ==# ['vimOperParen', 'vimOper'] | ||
Should SynStack(3, 15) ==# ['vimOperParen', 'vimString'] | ||
Should SynStack(3, 16) ==# ['vimOperParen', 'vimString'] | ||
Should SynStack(3, 17) ==# ['vimOper'] | ||
Should SynStack(3, 18) ==# [] | ||
Should SynStack(3, 19) ==# ['vimOper'] | ||
Should SynStack(3, 20) ==# ['vimOper'] | ||
Should SynStack(3, 21) ==# ['vimOper'] | ||
Should SynStack(3, 22) ==# [] | ||
Should SynStack(3, 23) ==# ['vimString'] | ||
Should SynStack(3, 24) ==# ['vimString'] | ||
endfunction | ||
|
||
|
||
|
||
|
||
" __END__ "{{{1 | ||
" vim: filetype=vim foldmethod=marker |