Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
132 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
install details | ||
|
||
1. make folder | ||
%VIMHOME%/after/syntax | ||
|
||
2. copy "squrrel.vim" to | ||
%VIMHOME%/after/syntax | ||
|
||
3. write in .vimrc | ||
au BufNewFile,BufRead *.nut setf squirrel |
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,8 @@ | ||
created by | ||
Yasuhiro Kanda | ||
|
||
description | ||
Vim syntax file for Squirrel (http://squirrel-lang.org/default.aspx) | ||
|
||
install details | ||
you read INSTALL |
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,46 @@ | ||
// statement | ||
break case continue default for while else catch if | ||
switch throw try | ||
|
||
// keywords | ||
class clone delegate extends local resume return this | ||
parent yield constructor vargc vargv static function | ||
|
||
|
||
// operators | ||
! != || == && <= => > + += - -= / /= * *= % %= ++ -- <- | ||
= & ^ | ~ >> << >>> instanceof in delete typeof | ||
[ ] . :: | ||
|
||
// other tokens | ||
{ } : ; | ||
|
||
|
||
|
||
// literals | ||
true | ||
false | ||
null | ||
1 | ||
12 | ||
123 | ||
1234 | ||
0 | ||
00 | ||
0xf | ||
0xF | ||
0XF | ||
0Xf | ||
0xFF00A120 | ||
0xff00a120 | ||
0xcafebabe | ||
0xCAFEBABE | ||
1.52 | ||
1.e2 | ||
1.e-2 | ||
"I'm a string" | ||
@"I'm a verbatim string" | ||
@"I'm a multiline verbatim string" | ||
|
||
|
||
/* hoghoge */ |
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,68 @@ | ||
"------------------------------------------------------------------------------ | ||
" Vim syntax file | ||
" Language: Squirrel (squirrel-lang.org) | ||
" Maintainer: YASUHIRO.Kanda <yasuhiro.kanda@gmail.com> | ||
" Last Change: 08-Mar-2010. | ||
" Filenames: *.nut | ||
" Version: 0.2 | ||
"------------------------------------------------------------------------------ | ||
" how to install | ||
" | ||
" 1. make folder | ||
" %VIMHOME%/after/syntax | ||
" | ||
" 2. copy "squrrel.vim" to | ||
" %VIMHOME%/after/syntax | ||
" | ||
" 3. in .vimrc | ||
" au BufNewFile,BufRead *.nut setf squirrel | ||
"------------------------------------------------------------------------------ | ||
|
||
syn case match | ||
syn keyword sqStatement clone delegate resume return this parent constructor | ||
syn keyword sqStatement vargc vargv yield class extends | ||
syn keyword sqConditional else if switch case default | ||
syn keyword sqExeption try catch throw | ||
syn keyword sqRepeat for while continue break | ||
syn keyword sqOperator in delete typeof instanceof | ||
syn keyword sqFunction function | ||
syn keyword sqStorageClass local static | ||
syn keyword sqConstant null | ||
syn keyword sqBoolean true false | ||
|
||
" Comments | ||
syn region sqCommentL start="\/\/" skip="\\$" end="$" keepend | ||
syn region sqComment start=+/\*+ end=+\*/+ | ||
|
||
" Strings | ||
syn region sqString start=+"+ skip=+\\"+ end=+"+ | ||
syn region sqString start=+@"+ skip=+\\"+ end=+"+ | ||
|
||
" Numbers (decimal, octadecimal, hexadecimal, floating point number) | ||
syn match sqNumberD "\<[1-9]\=\d\+\>" display | ||
syn match sqNumberH "\<0[xX]\x\+\>" display | ||
syn match sqNumberO "\<0\o\>" display | ||
syn match sqFloat "\<\d[\.][e\|E]\=[\-]\=\d\+\>" display | ||
|
||
hi def link sqStatement Statement | ||
hi def link sqConditional Conditional | ||
hi def link sqException Exception | ||
hi def link sqLabel Label | ||
hi def link sqRepeat Repeat | ||
hi def link sqOperator Operator | ||
hi def link sqFunction Function | ||
hi def link sqStorageClass StorageClass | ||
hi def link sqConstant Constant | ||
hi def link sqBoolean Boolean | ||
hi def link sqComment Comment | ||
hi def link sqCommentL Comment | ||
hi def link sqString String | ||
hi def link sqCharacter Character | ||
hi def link sqFloat Float | ||
hi def link sqNumberD Number | ||
hi def link sqNumberO Number | ||
hi def link sqNumberH Number | ||
hi def link sqKeyword Keyword | ||
|
||
syn sync maxlines=50 | ||
let b:current_syntax = "squirrel" |