From ad56d20f93afd23c9d096247f6af7f9532cf8bcb Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Sat, 27 Mar 2010 17:52:32 +0100 Subject: [PATCH] Update runtime files --- runtime/doc/eval.txt | 3 - runtime/doc/fold.txt | 12 +- runtime/doc/if_mzsch.txt | 9 +- runtime/doc/message.txt | 26 +- runtime/doc/todo.txt | 47 +-- runtime/doc/usr_22.txt | 4 +- runtime/doc/visual.txt | 10 +- runtime/filetype.vim | 5 +- runtime/ftplugin/cucumber.vim | 131 +++++++ runtime/getdos.aap | 31 +- runtime/getunix.aap | 29 +- runtime/indent/cucumber.vim | 59 +++ runtime/lang/menu_ko_kr.euckr.vim | 30 +- runtime/lang/menu_ko_kr.utf-8.vim | 30 +- runtime/plugin/gzip.vim | 8 +- runtime/syntax/cf.vim | 761 ++++++++++++++++++++++---------------- runtime/syntax/cucumber.vim | 117 ++++++ 17 files changed, 894 insertions(+), 418 deletions(-) create mode 100644 runtime/ftplugin/cucumber.vim create mode 100644 runtime/indent/cucumber.vim rewrite runtime/syntax/cf.vim (93%) create mode 100644 runtime/syntax/cucumber.vim diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index e742bb14..6f5a8f72 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -5388,8 +5388,6 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()* the color, cterm: color number as a string, term: empty string) "bg" background color (as with "fg") - "font" font name (only available in the GUI) - |highlight-font| "sp" special color (as with "fg") |highlight-guisp| "fg#" like "fg", but for the GUI and the GUI is running the name in "#RRGGBB" form @@ -5399,7 +5397,6 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()* "italic" "1" if italic "reverse" "1" if reverse "inverse" "1" if inverse (= reverse) - "standout" "1" if standout "underline" "1" if underlined "undercurl" "1" if undercurled diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index 5d465f44..60704c59 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -1,4 +1,4 @@ -*fold.txt* For Vim version 7.2. Last change: 2009 Dec 22 +*fold.txt* For Vim version 7.2. Last change: 2010 Feb 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -274,7 +274,7 @@ zf{motion} or Also see |fold-create-marker|. *zF* -zF Create a fold for N lines. Works like "zf". +zF Create a fold for [count] lines. Works like "zf". :{range}fo[ld] *:fold* *:fo* Create a fold for the lines in {range}. Works like "zf". @@ -399,24 +399,24 @@ MOVING OVER FOLDS ~ [z Move to the start of the current open fold. If already at the start, move to the start of the fold that contains it. If there is no containing fold, the command fails. - When a count is used, repeats the command N times. + When a count is used, repeats the command [count] times. *]z* ]z Move to the end of the current open fold. If already at the end, move to the end of the fold that contains it. If there is no containing fold, the command fails. - When a count is used, repeats the command N times. + When a count is used, repeats the command [count] times. *zj* zj Move downwards to the start of the next fold. A closed fold is counted as one fold. - When a count is used, repeats the command N times. + When a count is used, repeats the command [count] times. This command can be used after an |operator|. *zk* zk Move upwards to the end of the previous fold. A closed fold is counted as one fold. - When a count is used, repeats the command N times. + When a count is used, repeats the command [count] times. This command can be used after an |operator|. diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt index 484d09aa..3fe235cf 100644 --- a/runtime/doc/if_mzsch.txt +++ b/runtime/doc/if_mzsch.txt @@ -1,4 +1,4 @@ -*if_mzsch.txt* For Vim version 7.2. Last change: 2010 Jan 19 +*if_mzsch.txt* For Vim version 7.2. Last change: 2010 Feb 11 VIM REFERENCE MANUAL by Sergey Khorev @@ -185,8 +185,7 @@ Buffers *mzscheme-buffer* current buffer will be used. (get-buff-line-list {start} {end} [buffer]) Get a list of lines in a buffer. {Start} - and {end} are 1-based. {Start} is - inclusive, {end} - exclusive. + and {end} are 1-based and inclusive. (set-buff-line-list {start} {end} {string-list} [buffer]) Set a list of lines in a buffer. If string-list is #f or null, the lines get @@ -200,8 +199,8 @@ Buffers *mzscheme-buffer* Insert a list of lines into a buffer after {linenr}. If {linenr} is 0, lines will be inserted at start. - (curr-buff) Get the current buffer. Use procedures - from "vimcmd" module to change it. + (curr-buff) Get the current buffer. Use other MzScheme + interface procedures to change it. (buff-count) Get count of total buffers in the editor. (get-next-buff [buffer]) Get next buffer. (get-prev-buff [buffer]) Get previous buffer. Return #f when there diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 0ac2e996..a66e72f0 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -1,4 +1,4 @@ -*message.txt* For Vim version 7.2. Last change: 2009 Oct 28 +*message.txt* For Vim version 7.2. Last change: 2010 Feb 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -72,7 +72,7 @@ LIST OF MESSAGES Hangul automata ERROR block was not locked Didn't get block nr {N}? - ml_timestamp: Didn't get block 0?? + ml_upd_block0(): Didn't get block 0?? pointer block id wrong {N} Updated too many blocks? get_varp ERROR @@ -128,7 +128,6 @@ The color name {name} is unknown. See |gui-colors| for a list of colors that are available on most systems. *E458* > - Cannot allocate colormap entry for "xxxx" Cannot allocate colormap entry, some colors may be incorrect This means that there are not enough colors available for Vim. It will still @@ -180,7 +179,7 @@ manually delete the link or the file, or change the permissions so that Vim can overwrite. *E46* > - Cannot set read-only variable "{name}" + Cannot change read-only variable "{name}" You are trying to assign a value to an argument of a function |a:var| or a Vim internal variable |v:var| which is read-only. @@ -279,8 +278,8 @@ Writing a file was not completed successfully. The file is probably incomplete. *E13* *E189* > - File exists (use ! to override) - "{filename}" exists (use ! to override) + File exists (add ! to override) + "{filename}" exists (add ! to override) You are protected from accidentally overwriting a file. When you want to write anyway, use the same command, but add a "!" just after the command. @@ -349,7 +348,7 @@ the other way around. It should be used like this: {foo,bar}. This matches "foo" and "bar". *E315* > - ml_get: invalid lnum: + ml_get: invalid lnum: {number} This is an internal Vim error. Please try to find out how it can be reproduced, and submit a bug report |bugreport.vim|. @@ -420,8 +419,8 @@ mapping. All variations of this command give the same message: ":cunmap", |:map-| *E37* *E89* > - No write since last change (use ! to override) - No write since last change for buffer {N} (use ! to override) + No write since last change (add ! to override) + No write since last change for buffer {N} (add ! to override) You are trying to |abandon| a file that has changes. Vim protects you from losing your work. You can either write the changed file with ":w", or, if you @@ -477,7 +476,7 @@ This only happens on systems with 16 bit ints: The compiled regexp pattern is longer than about 65000 characters. Try using a shorter pattern. *E45* > - 'readonly' option is set (use ! to override) + 'readonly' option is set (add ! to override) You are trying to write a file that was marked as read-only. To write the file anyway, either reset the 'readonly' option, or add a '!' character just @@ -641,7 +640,7 @@ bit to be reset. It should be safe to reload the file. Set 'autoread' to automatically reload the file. *E211* > - Warning: File "{filename}" no longer available + File "{filename}" no longer available The file which you have started editing has disappeared, or is no longer accessible. Make sure you write the buffer somewhere to avoid losing @@ -688,6 +687,7 @@ no argument has been specified. *E474* *E475* > Invalid argument + Invalid argument: {arg} An Ex command has been executed, but an invalid argument has been specified. @@ -715,8 +715,8 @@ A range was specified for an Ex command that doesn't permit one. See Vim cannot create a temporary file. *E484* *E485* > - Can't open file %s" - Can't read file %s" + Can't open file {filename} + Can't read file {filename} Vim cannot read a temporary file. diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 05917c72..be188746 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.2. Last change: 2010 Feb 09 +*todo.txt* For Vim version 7.2. Last change: 2010 Mar 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -30,30 +30,22 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- -Patch for crash in netbeans on join command. (Xavier de Gaye, 2010 Feb 5) +Patch for access to freed memory. (Dominique Pelle, 2010 Feb 28) -Patch for mzscheme docs. (Sergey Khorev, 2010 Jan 29) +Update pythoncomplete. (Aaron Griffin, 2010 Feb 25) -Patch to support netbeans in Unix console Vim. (Xavier de Gaye, 2009 Apr 26) -Now with Mercurial repository (2010 Jan 2) - -Warnings for Python 2.6.4. (Dominique Pelle, 2010 Jan 31) - -Patch for better fix for Win64. (Sergey Khorev, 2010 Feb 4) +Patch for Visual Studio 2010. (George Reilly, 2010 Feb 26) +Test 69 breaks. -Patch for error messages. (Dominique Pelle, 2010 Feb 5) -Patch for visual-operators text (Dominique Pelle, 2010 Feb 6) +With cmdline window open, can drag the status line above it, but not another +one. (Jean Johner, 2010 Feb 27) -Patch for Win64 MingW struct size. (Andy Kittner, 2010 Feb 7) +I often see pasted text (from Firefox, to Vim in xterm) appear twice. +Also, Vim in xterm sometimes loses copy/paste ability (probably after running +an external command). -Patch for Perl interface with Perl 5.10. (Sergey Khorev, 2010 Feb 5) - -Patch for xxd to support "-r -p" as documented. (James Vega, 2010 Feb 8) - -Win32: patch for cross compile xxd and GvimExt. (Markus Heidelberg, 2009 Mar -18) Also update INSTALLpc.txt? -Patch for xxd/Make_cyg.mak. (Chris Sutcliffe, 2009 Jun 10) Included in the -above? +In netrw, click on last status lines causes netrw to open the last entry in +the window. (Jean Johner, 2010 Feb 26) iconv() doesn't fail on an illegal character, as documented. (Yongwei Wu, 2009 Nov 15, example Nov 26) Add argument to specify whether iconv() should fail @@ -63,15 +55,18 @@ Add local time at start of --startuptime output. Requires configure check for localtime(). Use format year-month-day hr:min:sec. +":s" summary in :folddo is not correct. (Jean Johner, 2010 Feb 20) + Shell not recognized properly if it ends in "csh -f". (James Vega, 2009 Nov 3) Find tail? Might have a / in argument. Find space? Might have space in path. +Patch to support netbeans in Unix console Vim. (Xavier de Gaye, 2009 Apr 26) +Now with Mercurial repository (2010 Jan 2) + Crash when assigning s: to variable, pointer becomes invalid later. (Yukihiro Nakadaira, 2009 Oct 12, confirmed by Dominique Pelle) -ml_get error when using SiSU syntax. (Nathan Thomas, 2009 Oct 29) - Coverity: ask someone to create new user: Dominique. look into reported defects: http://scan.coverity.com/rung2.html @@ -139,11 +134,6 @@ Probably needs a bit of work. List of encoding aliases. (Takao Fujiware, 2009 Jul 18) Are they all OK? Update Jul 22. -Patch for Ruby sockets. (todesking/Ariya Mizutani, 2008 Jul 1,24) -Confirmed by Anton Sharonov, 2008 Dec 26. - -Patch for Ruby 1.9. (Msaki Suketa, 2009 Jul 21, Jul 26) - Patch for completion of ":find" arguments. (Nazri Ramliy, 2009 Feb 22, 26) 8 For ":find" and ":sfind" expand files found in 'path'. Update 2009 Mar 28. @@ -1136,6 +1126,9 @@ When switching between windows the cursor is often put in the middle. Remember the relative position and restore that, just like lnum and col are restored. (Luc St-Louis) +Patch for adding "J" flag to 'cinoptions': placement of jump label. +(Manuel Konig, 2010 Feb 19) Update by Lech Lorens, Feb 22. + Vim 7.3: - Use latest autoconf (2.65) diff --git a/runtime/doc/usr_22.txt b/runtime/doc/usr_22.txt index 45bd2f4a..750f923f 100644 --- a/runtime/doc/usr_22.txt +++ b/runtime/doc/usr_22.txt @@ -1,4 +1,4 @@ -*usr_22.txt* For Vim version 7.2. Last change: 2007 Aug 14 +*usr_22.txt* For Vim version 7.2. Last change: 2010 Feb 21 VIM USER MANUAL - by Bram Moolenaar @@ -54,7 +54,7 @@ You can see these items: *.c files, etc) 5. How to get help (use the key), and an abbreviated listing of available commands -6. A listing of files, including "../", which allows one to to list +6. A listing of files, including "../", which allows one to list the parent directory. If you have syntax highlighting enabled, the different parts are highlighted diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index c04db4a0..7348ea9d 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -1,4 +1,4 @@ -*visual.txt* For Vim version 7.2. Last change: 2009 Oct 14 +*visual.txt* For Vim version 7.2. Last change: 2010 Feb 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -211,10 +211,18 @@ The objects that can be used are: ib inner () block |v_ib| aB a {} block (with braces) |v_aB| iB inner {} block |v_iB| + at a block (with tags) |v_at| + it inner block |v_it| a< a <> block (with <>) |v_a<| i< inner <> block |v_i<| a[ a [] block (with []) |v_a[| i[ inner [] block |v_i[| + a" a double quoted string (with quotes) |v_aquote| + i" inner double quoted string |v_iquote| + a' a single quoted string (with quotes) |v_a'| + i' inner simple quoted string |v_i'| + a` a string in backticks (with backticks) |v_a`| + i` inner string in backticks |v_i`| Additionally the following commands can be used: : start Ex command for highlighted lines (1) |v_:| diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 5665cc29..140f0c56 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2009 Dec 24 +" Last Change: 2010 Feb 24 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -529,6 +529,9 @@ au BufNewFile,BufRead *.qc setf c " Configure files au BufNewFile,BufRead *.cfg setf cfg +" Cucumber +au BufNewFile,BufRead *.feature setf cucumber + " Communicating Sequential Processes au BufNewFile,BufRead *.csp,*.fdr setf csp diff --git a/runtime/ftplugin/cucumber.vim b/runtime/ftplugin/cucumber.vim new file mode 100644 index 00000000..8ef8c239 --- /dev/null +++ b/runtime/ftplugin/cucumber.vim @@ -0,0 +1,131 @@ +" Vim filetype plugin +" Language: Cucumber +" Maintainer: Tim Pope + +" Only do this when not done yet for this buffer +if (exists("b:did_ftplugin")) + finish +endif +let b:did_ftplugin = 1 + +setlocal formatoptions-=t formatoptions+=croql +setlocal comments=:# commentstring=#\ %s +setlocal omnifunc=CucumberComplete + +let b:undo_ftplugin = "setl fo< com< cms< ofu<" + +let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??') + +if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps") + nmap :exe jump('edit',v:count) + nmap ] :exe jump('split',v:count) + nmap :exe jump('split',v:count) + nmap } :exe jump('pedit',v:count) + let b:undo_ftplugin .= "| sil! iunmap! | sil! iunmap! ]| sil! iunmap! | sil! iunmap! }" +endif + +function! s:jump(command,count) + let steps = s:steps('.') + if len(steps) == 0 || len(steps) < a:count + return 'echoerr "No matching step found"' + elseif len(steps) > 1 && !a:count + return 'echoerr "Multiple matching steps found"' + else + let c = a:count ? a:count-1 : 0 + return a:command.' +'.steps[c][1].' '.escape(steps[c][0],' %#') + endif +endfunction + +function! s:allsteps() + let step_pattern = '\C^\s*\K\k*\>\s*\zs\S.\{-\}\ze\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)' + let steps = [] + for file in split(glob(b:cucumber_root.'/**/*.rb'),"\n") + let lines = readfile(file) + let num = 0 + for line in lines + let num += 1 + if line =~ step_pattern + let type = matchstr(line,'\w\+') + let steps += [[file,num,type,matchstr(line,step_pattern)]] + endif + endfor + endfor + return steps +endfunction + +function! s:steps(lnum) + let c = indent(a:lnum) + 1 + while synIDattr(synID(a:lnum,c,1),'name') !~# '^$\|Region$' + let c = c + 1 + endwhile + let step = matchstr(getline(a:lnum)[c-1 : -1],'^\s*\zs.\{-\}\ze\s*$') + return filter(s:allsteps(),'s:stepmatch(v:val[3],step)') +endfunction + +function! s:stepmatch(receiver,target) + if a:receiver =~ '^[''"].*[''"]$' + let pattern = '^'.escape(substitute(a:receiver[1:-2],'$\w\+','(.*)','g'),'/').'$' + elseif a:receiver =~ '^/.*/$' + let pattern = a:receiver[1:-2] + elseif a:receiver =~ '^%r..*.$' + let pattern = escape(a:receiver[3:-2],'/') + else + return 0 + endif + try + let vimpattern = substitute(substitute(pattern,'\\\@ + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal autoindent +setlocal indentexpr=GetCucumberIndent() +setlocal indentkeys=o,O,*,<:>,0,0#,=,!^F + +" Only define the function once. +if exists("*GetCucumberIndent") + finish +endif + +function! s:syn(lnum) + return synIDattr(synID(a:lnum,1+indent(a:lnum),1),'name') +endfunction + +function! GetCucumberIndent() + let line = getline(prevnonblank(v:lnum-1)) + let cline = getline(v:lnum) + let syn = s:syn(prevnonblank(v:lnum-1)) + let csyn = s:syn(v:lnum) + if csyn ==# 'cucumberFeature' || cline =~# '^\s*Feature:' + return 0 + elseif csyn ==# 'cucumberExamples' || cline =~# '^\s*\%(Examples\|Scenarios\):' + return 2 * &sw + elseif csyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || cline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):' + return &sw + elseif syn ==# 'cucumberFeature' || line =~# '^\s*Feature:' + return &sw + elseif syn ==# 'cucumberExamples' || line =~# '^\s*\%(Examples\|Scenarios\):' + return 3 * &sw + elseif syn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || line =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):' + return 2 * &sw + elseif cline =~# '^\s*@' && (s:syn(nextnonblank(v:lnum+1)) == 'cucumberFeature' || getline(nextnonblank(v:lnum+1)) =~# '^\s*Feature:' || indent(prevnonblank(v:lnum-1)) <= 0) + return 0 + elseif line =~# '^\s*@' + return &sw + elseif cline =~# '^\s*|' && line =~# '^\s*|' + return indent(prevnonblank(v:lnum-1)) + elseif cline =~# '^\s*|' && line =~# '^\s*[^|#]' + return indent(prevnonblank(v:lnum-1)) + &sw + elseif cline =~# '^\s*[^|# \t]' && line =~# '^\s*|' + return indent(prevnonblank(v:lnum-1)) - &sw + elseif cline =~# '^\s*$' && line =~# '^\s*|' + let in = indent(prevnonblank(v:lnum-1)) + return in == indent(v:lnum) ? in : in - &sw + elseif cline =~# '^\s*#' && getline(v:lnum-1) =~ '^\s*$' && getline(v:lnum+1) =~# '\S' + return indent(getline(v:lnum+1)) + endif + return indent(prevnonblank(v:lnum-1)) +endfunction + +" vim:set sts=2 sw=2: diff --git a/runtime/lang/menu_ko_kr.euckr.vim b/runtime/lang/menu_ko_kr.euckr.vim index 5e2851ee..11809cf9 100644 --- a/runtime/lang/menu_ko_kr.euckr.vim +++ b/runtime/lang/menu_ko_kr.euckr.vim @@ -1,6 +1,6 @@ " Menu Translations: Korean " Maintainer: SungHyun Nam -" Last Change: 2008 Sep 17 +" Last Change: 2010 Feb 18 " Quit when menu translations have already been done. if exists("did_menu_trans") @@ -14,19 +14,21 @@ scriptencoding euc-kr menutrans &Help µµ¿ò¸»(&H) menutrans &Overview °³°ü(&O) menutrans &User\ Manual »ç¿ëÀÚ\ ¸Å´º¾ó(&U) -menutrans &How-to\ links ¾îÂîÇϳª\ ¸ñ·Ï(&H) -menutrans &GUI ±¸ÀÌ(&G) +menutrans &How-to\ links ÇÏ¿ìÅõ\ ¸ñ·Ï(&H) +menutrans &GUI GUI(&G) menutrans &Find\.\.\. ã±â(&F)\.\.\. menutrans &Credits °í¸¶¿î\ ºÐ(&C) menutrans Co&pying ÀúÀÛ±Ç(&p) +menutrans &Sponsor/Register ÈÄ¿ø/µî·Ï(&S) menutrans O&rphans °í¾Æ(&r) -menutrans &Version ¹öÀü(&V) +menutrans &Version ¹öÁ¯(&V) menutrans &About ÀÌ\ ÇÁ·Î±×·¥Àº(&A) " File menu menutrans &File ÆÄÀÏ(&F) menutrans &Open\.\.\.:e ¿­±â(&O)\.\.\.:e menutrans Sp&lit-Open\.\.\.:sp ³ª´²¼­\ ¿­±â(&l)\.\.\.:sp +menutrans Open\ Tab\.\.\.:tabnew ÅÇ\ ¿­±â\.\.\.:tabnew menutrans &New:enew »õ·Î¿î(&N):enew menutrans &Close:close ´Ý±â(&C):close menutrans &Save:w ÀúÀå(&S):w @@ -52,6 +54,7 @@ menutrans &Select\ AllggVG menutrans &Find\.\.\. ã±â(&F)\.\.\. menutrans Find\ and\ Rep&lace\.\.\. ã¾Æ¼­\ ¹Ù²Ù±â(&l)\.\.\. menutrans Settings\ &Window ¼³Á¤\ â(&W) +menutrans Startup\ &Settings ½ÃÀÛ\ ¼³Á¤(&S) " Edit/Global Settings menutrans &Global\ Settings Àü¿ª\ ¼³Á¤(&G) @@ -104,6 +107,21 @@ menutrans &Jump\ to\ this\ tagg^] menutrans Jump\ &back^T µÚ·Î\ °¡±â(&b)^T menutrans Build\ &Tags\ File ²¿¸®Ç¥\ ÆÄÀÏ\ ¸¸µé±â(&T) +menutrans &Spelling ¸ÂÃã¹ý\ °Ë»ç(&S) +menutrans &Spell\ Check\ On ¸ÂÃã¹ý\ °Ë»ç\ ½ÃÀÛ(&S) +menutrans Spell\ Check\ &Off ¸ÂÃã¹ý\ °Ë»ç\ ³¡(&O) +menutrans To\ &Next\ error]s ´ÙÀ½\ ¿¡·¯·Î(&N)]s +menutrans To\ &Previous\ error[s ÀÌÀü\ ¿¡·¯·Î(&P)[s +menutrans Suggest\ &Correctionsz= ¼öÁ¤\ Á¦¾È(&C)z= +menutrans &Repeat\ correction:spellrepall ¼öÁ¤\ ¹Ýº¹(&R):spellrepall +menutrans Set\ language\ to\ "en" ¾ð¾î¸¦\ "en"À¸·Î\ ¼³Á¤ +menutrans Set\ language\ to\ "en_au" ¾ð¾î¸¦\ "en_au"·Î\ ¼³Á¤ +menutrans Set\ language\ to\ "en_ca" ¾ð¾î¸¦\ "en_ca"·Î\ ¼³Á¤ +menutrans Set\ language\ to\ "en_gb" ¾ð¾î¸¦\ "en_gb"·Î\ ¼³Á¤ +menutrans Set\ language\ to\ "en_nz" ¾ð¾î¸¦\ "en_nz"À¸·Î\ ¼³Á¤ +menutrans Set\ language\ to\ "en_us" ¾ð¾î¸¦\ "en_us"·Î\ ¼³Á¤ +menutrans &Find\ More\ Languages ´Ù¸¥\ ¾ð¾î\ ã±â(&F) + " Tools.Fold Menu menutrans &Folding Á¢±â(&F) " open close folds @@ -134,7 +152,7 @@ menutrans &Update menutrans &Get\ Block ºí·°\ °¡Á®¿À±â(&G) menutrans &Put\ Block ºí·°\ Áý¾î³Ö±â(&P) -menutrans &Make:make Make(&M):make +menutrans &Make:make ºôµå(&M):make menutrans &List\ Errors:cl ¿¡·¯\ ¸ñ·Ï\ º¸±â(&L):cl menutrans L&ist\ Messages:cl! ¸Þ½ÃÁö\ ¸ñ·Ï\ º¸±â(&i):cl! menutrans &Next\ Error:cn ´ÙÀ½\ ¿¡·¯(&N):cn @@ -145,7 +163,7 @@ menutrans Error\ &Window menutrans &Update:cwin °»½Å(&U):cwin menutrans &Open:copen ¿­±â(&O):copen menutrans &Close:cclose ´Ý±â(&C):cclose -menutrans &Set\ Compiler ÄÄÆÄÀÏ·¯\ ¼³Á¤(&S) +menutrans Se&T\ Compiler ÄÄÆÄÀÏ·¯\ ¼³Á¤(&T) menutrans &Convert\ to\ HEX:%!mc\ vim:xxd ½ÊÀ°ÁøÀ¸·Î\ º¯È¯:%!mc\ vim:xxd menutrans &Convert\ to\ HEX:%!xxd ½ÊÀ°ÁøÀ¸·Î\ º¯È¯(&C):%!xxd menutrans Conve&rt\ back:%!mc\ vim:xxd\ -r ¿ø·¡´ë·Î\ º¯È¯(&r):%!mc\ vim:xxd\ -r diff --git a/runtime/lang/menu_ko_kr.utf-8.vim b/runtime/lang/menu_ko_kr.utf-8.vim index d0b1cc0b..ef461737 100644 --- a/runtime/lang/menu_ko_kr.utf-8.vim +++ b/runtime/lang/menu_ko_kr.utf-8.vim @@ -1,6 +1,6 @@ " Menu Translations: Korean " Maintainer: SungHyun Nam -" Last Change: 2008 Sep 17 +" Last Change: 2010 Feb 18 " Quit when menu translations have already been done. if exists("did_menu_trans") @@ -14,19 +14,21 @@ scriptencoding utf-8 menutrans &Help 도움말(&H) menutrans &Overview 개관(&O) menutrans &User\ Manual 사용자\ 매뉴얼(&U) -menutrans &How-to\ links 어찌하나\ 목록(&H) -menutrans &GUI 구이(&G) +menutrans &How-to\ links 하우투\ 목록(&H) +menutrans &GUI GUI(&G) menutrans &Find\.\.\. 찾기(&F)\.\.\. menutrans &Credits 고마운\ 분(&C) menutrans Co&pying 저작권(&p) +menutrans &Sponsor/Register 후원/등록(&S) menutrans O&rphans 고아(&r) -menutrans &Version 버전(&V) +menutrans &Version 버젼(&V) menutrans &About 이\ 프로그램은(&A) " File menu menutrans &File 파일(&F) menutrans &Open\.\.\.:e 열기(&O)\.\.\.:e menutrans Sp&lit-Open\.\.\.:sp 나눠서\ 열기(&l)\.\.\.:sp +menutrans Open\ Tab\.\.\.:tabnew 탭\ 열기\.\.\.:tabnew menutrans &New:enew 새로운(&N):enew menutrans &Close:close 닫기(&C):close menutrans &Save:w 저장(&S):w @@ -52,6 +54,7 @@ menutrans &Select\ AllggVG 모두\ 고르기(&S)ggVG menutrans &Find\.\.\. 찾기(&F)\.\.\. menutrans Find\ and\ Rep&lace\.\.\. 찾아서\ 바꾸기(&l)\.\.\. menutrans Settings\ &Window 설정\ 창(&W) +menutrans Startup\ &Settings 시작\ 설정(&S) " Edit/Global Settings menutrans &Global\ Settings 전역\ 설정(&G) @@ -104,6 +107,21 @@ menutrans &Jump\ to\ this\ tagg^] 이\ 꼬리표로\ 가기(&J)g^] menutrans Jump\ &back^T 뒤로\ 가기(&b)^T menutrans Build\ &Tags\ File 꼬리표\ 파일\ 만들기(&T) +menutrans &Spelling 맞춤법\ 검사(&S) +menutrans &Spell\ Check\ On 맞춤법\ 검사\ 시작(&S) +menutrans Spell\ Check\ &Off 맞춤법\ 검사\ 끝(&O) +menutrans To\ &Next\ error]s 다음\ 에러로(&N)]s +menutrans To\ &Previous\ error[s 이전\ 에러로(&P)[s +menutrans Suggest\ &Correctionsz= 수정\ 제안(&C)z= +menutrans &Repeat\ correction:spellrepall 수정\ 반복(&R):spellrepall +menutrans Set\ language\ to\ "en" 언어를\ "en"으로\ 설정 +menutrans Set\ language\ to\ "en_au" 언어를\ "en_au"로\ 설정 +menutrans Set\ language\ to\ "en_ca" 언어를\ "en_ca"로\ 설정 +menutrans Set\ language\ to\ "en_gb" 언어를\ "en_gb"로\ 설정 +menutrans Set\ language\ to\ "en_nz" 언어를\ "en_nz"으로\ 설정 +menutrans Set\ language\ to\ "en_us" 언어를\ "en_us"로\ 설정 +menutrans &Find\ More\ Languages 다른\ 언어\ 찾기(&F) + " Tools.Fold Menu menutrans &Folding 접기(&F) " open close folds @@ -134,7 +152,7 @@ menutrans &Update 갱신(&U) menutrans &Get\ Block 블럭\ 가져오기(&G) menutrans &Put\ Block 블럭\ 집어넣기(&P) -menutrans &Make:make Make(&M):make +menutrans &Make:make 빌드(&M):make menutrans &List\ Errors:cl 에러\ 목록\ 보기(&L):cl menutrans L&ist\ Messages:cl! 메시지\ 목록\ 보기(&i):cl! menutrans &Next\ Error:cn 다음\ 에러(&N):cn @@ -145,7 +163,7 @@ menutrans Error\ &Window 에러\ 창(&W) menutrans &Update:cwin 갱신(&U):cwin menutrans &Open:copen 열기(&O):copen menutrans &Close:cclose 닫기(&C):cclose -menutrans &Set\ Compiler 컴파일러\ 설정(&S) +menutrans Se&T\ Compiler 컴파일러\ 설정(&T) menutrans &Convert\ to\ HEX:%!mc\ vim:xxd 십육진으로\ 변환:%!mc\ vim:xxd menutrans &Convert\ to\ HEX:%!xxd 십육진으로\ 변환(&C):%!xxd menutrans Conve&rt\ back:%!mc\ vim:xxd\ -r 원래대로\ 변환(&r):%!mc\ vim:xxd\ -r diff --git a/runtime/plugin/gzip.vim b/runtime/plugin/gzip.vim index edef1495..16e4f8fa 100644 --- a/runtime/plugin/gzip.vim +++ b/runtime/plugin/gzip.vim @@ -1,6 +1,6 @@ " Vim plugin for editing compressed files. " Maintainer: Bram Moolenaar -" Last Change: 2010 Mar 10 +" Last Change: 2009 Jul 01 " Exit quickly when: " - this plugin was already loaded @@ -20,25 +20,21 @@ augroup gzip " " Set binary mode before reading the file. " Use "gzip -d", gunzip isn't always available. - autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz setlocal bin + autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma setlocal bin autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d") - autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d") autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z") - autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z") autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") autocmd FileAppendPre *.Z call gzip#appre("uncompress") autocmd FileAppendPre *.lzma call gzip#appre("lzma -d") - autocmd FileAppendPre *.xz call gzip#appre("xz -d") autocmd FileAppendPost *.gz call gzip#write("gzip") autocmd FileAppendPost *.bz2 call gzip#write("bzip2") autocmd FileAppendPost *.Z call gzip#write("compress -f") autocmd FileAppendPost *.lzma call gzip#write("lzma -z") - autocmd FileAppendPost *.xz call gzip#write("xz -z") augroup END diff --git a/runtime/syntax/cf.vim b/runtime/syntax/cf.vim dissimilarity index 93% index bda24d79..63d976d9 100644 --- a/runtime/syntax/cf.vim +++ b/runtime/syntax/cf.vim @@ -1,321 +1,440 @@ -" Vim syntax file -" Language: ColdFusion -" Maintainer: Toby Woodwark (toby.woodwark+vim@gmail.com) -" Last Change: 2007 Nov 19 -" Filenames: *.cfc *.cfm -" Version: Macromedia ColdFusion MX 7 -" Usage: Note that ColdFusion has its own comment syntax -" i.e. - -" For version 5.x, clear all syntax items. -" For version 6.x+, quit if a syntax file is already loaded. -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -" Use all the stuff from the HTML syntax file. -" TODO remove this; CFML is not a superset of HTML -if version < 600 - source :p:h/html.vim -else - runtime! syntax/html.vim -endif - -syn sync fromstart -syn sync maxlines=200 -syn case ignore - -" Scopes and keywords. -syn keyword cfScope contained cgi cffile cookie request caller this thistag -syn keyword cfScope contained cfcatch variables application server session client form url attributes -syn keyword cfScope contained arguments -syn keyword cfBool contained yes no true false - -" Operator strings. -syn keyword cfOperator contained xor eqv and or lt le lte gt ge gte equal eq neq not is mod contains -syn match cfOperatorMatch contained "\" -syn match cfOperatorMatch contained "\<\(greater\|less\)\_s\+than\(\_s\+or\_s\+equal\_s\+to\)\?\>" -syn match cfOperatorMatch contained "[\+\-\*\/\\\^\&][\+\-\*\/\\\^\&]\@!" -syn cluster cfOperatorCluster contains=cfOperator,cfOperatorMatch - -" Tag names. -syn keyword cfTagName contained cfabort cfapplet cfapplication cfargument cfassociate -syn keyword cfTagName contained cfbreak cfcache cfcalendar cfcase cfcatch -syn keyword cfTagName contained cfchart cfchartdata cfchartseries cfcol cfcollection -syn keyword cfTagName contained cfcomponent cfcontent cfcookie cfdefaultcase cfdirectory -syn keyword cfTagName contained cfdocument cfdocumentitem cfdocumentsection cfdump cfelse -syn keyword cfTagName contained cfelseif cferror cfexecute cfexit cffile cfflush cfform -syn keyword cfTagName contained cfformgroup cfformitem cfftp cffunction cfgraph cfgraphdata -syn keyword cfTagName contained cfgrid cfgridcolumn cfgridrow cfgridupdate cfheader -syn keyword cfTagName contained cfhtmlhead cfhttp cfhttpparam cfif cfimport -syn keyword cfTagName contained cfinclude cfindex cfinput cfinsert cfinvoke cfinvokeargument -syn keyword cfTagName contained cfldap cflocation cflock cflog cflogin cfloginuser cflogout -syn keyword cfTagName contained cfloop cfmail cfmailparam cfmailpart cfmodule -syn keyword cfTagName contained cfNTauthenticate cfobject cfobjectcache cfoutput cfparam -syn keyword cfTagName contained cfpop cfprocessingdirective cfprocparam cfprocresult -syn keyword cfTagName contained cfproperty cfquery cfqueryparam cfregistry cfreport -syn keyword cfTagName contained cfreportparam cfrethrow cfreturn cfsavecontent cfschedule -syn keyword cfTagName contained cfscript cfsearch cfselect cfservlet cfservletparam cfset -syn keyword cfTagName contained cfsetting cfsilent cfslider cfstoredproc cfswitch cftable -syn keyword cfTagName contained cftextarea cftextinput cfthrow cftimer cftrace cftransaction -syn keyword cfTagName contained cftree cftreeitem cftry cfupdate cfwddx cfxml - -" Tag parameters. -syn keyword cfArg contained abort accept access accessible action addnewline addtoken -syn keyword cfArg contained agentname align appendkey appletsource application -syn keyword cfArg contained applicationtimeout applicationtoken archive -syn keyword cfArg contained argumentcollection arguments asciiextensionlist -syn keyword cfArg contained attachmentpath attributecollection attributes autowidth -syn keyword cfArg contained backgroundvisible basetag bcc bgcolor bind bindingname -syn keyword cfArg contained blockfactor body bold border branch cachedafter cachedwithin -syn keyword cfArg contained casesensitive category categorytree cc cfsqltype charset -syn keyword cfArg contained chartheight chartwidth checked class clientmanagement -syn keyword cfArg contained clientstorage codebase colheaderalign colheaderbold -syn keyword cfArg contained colheaderfont colheaderfontsize colheaderitalic colheaders -syn keyword cfArg contained colheadertextcolor collection colorlist colspacing columns -syn keyword cfArg contained completepath component condition connection contentid -syn keyword cfArg contained context contextbytes contexthighlightbegin -syn keyword cfArg contained contexthighlightend contextpassages cookiedomain criteria -syn keyword cfArg contained custom1 custom2 custom3 custom4 data dataalign -syn keyword cfArg contained databackgroundcolor datacollection datasource daynames -syn keyword cfArg contained dbname dbserver dbtype dbvarname debug default delete -syn keyword cfArg contained deletebutton deletefile delimiter delimiters description -syn keyword cfArg contained destination detail directory disabled display displayname -syn keyword cfArg contained disposition dn domain editable enablecab enablecfoutputonly -syn keyword cfArg contained enabled encoded encryption enctype enddate endrange endtime -syn keyword cfArg contained entry errorcode exception existing expand expires expireurl -syn keyword cfArg contained expression extendedinfo extends extensions external -syn keyword cfArg contained failifexists failto file filefield filename filter -syn keyword cfArg contained firstdayofweek firstrowasheaders fixnewline font fontbold -syn keyword cfArg contained fontembed fontitalic fontsize foregroundcolor format -syn keyword cfArg contained formfields formula from generateuniquefilenames getasbinary -syn keyword cfArg contained grid griddataalign gridlines groovecolor group -syn keyword cfArg contained groupcasesensitive header headeralign headerbold headerfont -syn keyword cfArg contained headerfontsize headeritalic headerlines headertextcolor -syn keyword cfArg contained height highlighthref hint href hrefkey hscroll hspace html -syn keyword cfArg contained htmltable id idletimeout img imgopen imgstyle index inline -syn keyword cfArg contained input insert insertbutton interval isolation italic item -syn keyword cfArg contained itemcolumn key keyonly label labelformat language list -syn keyword cfArg contained listgroups locale localfile log loginstorage lookandfeel -syn keyword cfArg contained mailerid mailto marginbottom marginleft marginright -syn keyword cfArg contained margintop markersize markerstyle mask max maxlength maxrows -syn keyword cfArg contained message messagenumber method mimeattach mimetype min mode -syn keyword cfArg contained modifytype monthnames multipart multiple name nameconflict -syn keyword cfArg contained namespace new newdirectory notsupported null numberformat -syn keyword cfArg contained object omit onblur onchange onclick onerror onfocus -syn keyword cfArg contained onkeydown onkeyup onload onmousedown onmouseup onreset -syn keyword cfArg contained onsubmit onvalidate operation orderby orientation output -syn keyword cfArg contained outputfile overwrite ownerpassword pageencoding pageheight -syn keyword cfArg contained pagetype pagewidth paintstyle param_1 param_2 param_3 -syn keyword cfArg contained param_4 param_5 param_6 param_7 param_8 param_9 parent -syn keyword cfArg contained parrent passive passthrough password path pattern -syn keyword cfArg contained permissions picturebar pieslicestyle port porttypename -syn keyword cfArg contained prefix preloader preservedata previouscriteria procedure -syn keyword cfArg contained protocol provider providerdsn proxybypass proxypassword -syn keyword cfArg contained proxyport proxyserver proxyuser publish query queryasroot -syn keyword cfArg contained queryposition range rebind recurse redirect referral -syn keyword cfArg contained refreshlabel remotefile replyto report requesttimeout -syn keyword cfArg contained required reset resoleurl resolveurl result resultset -syn keyword cfArg contained retrycount returnasbinary returncode returntype -syn keyword cfArg contained returnvariable roles rotated rowheaderalign rowheaderbold -syn keyword cfArg contained rowheaderfont rowheaderfontsize rowheaderitalic rowheaders -syn keyword cfArg contained rowheadertextcolor rowheaderwidth rowheight scale scalefrom -syn keyword cfArg contained scaleto scope scriptprotect scriptsrc secure securitycontext -syn keyword cfArg contained select selectcolor selected selecteddate selectedindex -syn keyword cfArg contained selectmode separator seriescolor serieslabel seriesplacement -syn keyword cfArg contained server serviceport serviceportname sessionmanagement -syn keyword cfArg contained sessiontimeout setclientcookies setcookie setdomaincookies -syn keyword cfArg contained show3d showborder showdebugoutput showerror showlegend -syn keyword cfArg contained showmarkers showxgridlines showygridlines size skin sort -syn keyword cfArg contained sortascendingbutton sortcontrol sortdescendingbutton -syn keyword cfArg contained sortxaxis source spoolenable sql src srcfile start startdate -syn keyword cfArg contained startrange startrow starttime status statuscode statustext -syn keyword cfArg contained step stoponerror style subject suggestions -syn keyword cfArg contained suppresswhitespace tablename tableowner tablequalifier -syn keyword cfArg contained taglib target task template text textcolor textqualifier -syn keyword cfArg contained throwonerror throwonerror throwonfailure throwontimeout -syn keyword cfArg contained timeout timespan tipbgcolor tipstyle title to tooltip -syn keyword cfArg contained toplevelvariable transfermode type uid unit url urlpath -syn keyword cfArg contained useragent username userpassword usetimezoneinfo validate -syn keyword cfArg contained validateat value valuecolumn values valuesdelimiter -syn keyword cfArg contained valuesdisplay var variable vertical visible vscroll vspace -syn keyword cfArg contained webservice width wmode wraptext wsdlfile xaxistitle -syn keyword cfArg contained xaxistype xoffset yaxistitle yaxistype yoffset - -" ColdFusion Functions. -syn keyword cfFunctionName contained ACos ASin Abs AddSOAPRequestHeader AddSOAPResponseHeader -syn keyword cfFunctionName contained ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt ArrayInsertAt -syn keyword cfFunctionName contained ArrayIsEmpty ArrayLen ArrayMax ArrayMin ArrayNew -syn keyword cfFunctionName contained ArrayPrepend ArrayResize ArraySet ArraySort ArraySum -syn keyword cfFunctionName contained ArraySwap ArrayToList Asc Atn AuthenticatedContext -syn keyword cfFunctionName contained AuthenticatedUser BinaryDecode BinaryEncode BitAnd -syn keyword cfFunctionName contained BitMaskClear BitMaskRead BitMaskSet BitNot BitOr BitSHLN -syn keyword cfFunctionName contained BitSHRN BitXor CJustify Ceiling CharsetDecode CharsetEncode -syn keyword cfFunctionName contained Chr Compare CompareNoCase Cos CreateDate CreateDateTime -syn keyword cfFunctionName contained CreateODBCDate CreateODBCDateTime CreateODBCTime -syn keyword cfFunctionName contained CreateObject CreateTime CreateTimeSpan CreateUUID DE DateAdd -syn keyword cfFunctionName contained DateCompare DateConvert DateDiff DateFormat DatePart Day -syn keyword cfFunctionName contained DayOfWeek DayOfWeekAsString DayOfYear DaysInMonth DaysInYear -syn keyword cfFunctionName contained DecimalFormat DecrementValue Decrypt DecryptBinary -syn keyword cfFunctionName contained DeleteClientVariable DirectoryExists DollarFormat Duplicate -syn keyword cfFunctionName contained Encrypt EncryptBinary Evaluate Exp ExpandPath FileExists -syn keyword cfFunctionName contained Find FindNoCase FindOneOf FirstDayOfMonth Fix FormatBaseN -syn keyword cfFunctionName contained GenerateSecretKey GetAuthUser GetBaseTagData GetBaseTagList -syn keyword cfFunctionName contained GetBaseTemplatePath GetClientVariablesList GetContextRoot -syn keyword cfFunctionName contained GetCurrentTemplatePath GetDirectoryFromPath GetEncoding -syn keyword cfFunctionName contained GetException GetFileFromPath GetFunctionList -syn keyword cfFunctionName contained GetGatewayHelper GetHttpRequestData GetHttpTimeString -syn keyword cfFunctionName contained GetLocalHostIP -syn keyword cfFunctionName contained GetLocale GetLocaleDisplayName GetMetaData GetMetricData -syn keyword cfFunctionName contained GetPageContext GetProfileSections GetProfileString -syn keyword cfFunctionName contained GetSOAPRequest GetSOAPRequestHeader GetSOAPResponse -syn keyword cfFunctionName contained GetSOAPResponseHeader GetTempDirectory GetTempFile -syn keyword cfFunctionName contained GetTickCount GetTimeZoneInfo GetToken -syn keyword cfFunctionName contained HTMLCodeFormat HTMLEditFormat Hash Hour IIf IncrementValue -syn keyword cfFunctionName contained InputBaseN Insert Int IsArray IsAuthenticated IsAuthorized -syn keyword cfFunctionName contained IsBinary IsBoolean IsCustomFunction IsDate IsDebugMode -syn keyword cfFunctionName contained IsDefined -syn keyword cfFunctionName contained IsLeapYear IsLocalHost IsNumeric -syn keyword cfFunctionName contained IsNumericDate IsObject IsProtected IsQuery IsSOAPRequest -syn keyword cfFunctionName contained IsSimpleValue IsStruct IsUserInRole IsValid IsWDDX IsXML -syn keyword cfFunctionName contained IsXmlAttribute IsXmlDoc IsXmlElem IsXmlNode IsXmlRoot -syn keyword cfFunctionName contained JSStringFormat JavaCast LCase LJustify LSCurrencyFormat -syn keyword cfFunctionName contained LSDateFormat LSEuroCurrencyFormat LSIsCurrency LSIsDate -syn keyword cfFunctionName contained LSIsNumeric LSNumberFormat LSParseCurrency LSParseDateTime -syn keyword cfFunctionName contained LSParseEuroCurrency LSParseNumber LSTimeFormat LTrim Left -syn keyword cfFunctionName contained Len ListAppend ListChangeDelims ListContains -syn keyword cfFunctionName contained ListContainsNoCase ListDeleteAt ListFind ListFindNoCase -syn keyword cfFunctionName contained ListFirst ListGetAt ListInsertAt ListLast ListLen -syn keyword cfFunctionName contained ListPrepend ListQualify ListRest ListSetAt ListSort -syn keyword cfFunctionName contained ListToArray ListValueCount ListValueCountNoCase Log Log10 -syn keyword cfFunctionName contained Max Mid Min Minute Month MonthAsString Now NumberFormat -syn keyword cfFunctionName contained ParagraphFormat ParseDateTime Pi -syn keyword cfFunctionName contained PreserveSingleQuotes Quarter QueryAddColumn QueryAddRow -syn keyword cfFunctionName contained QueryNew QuerySetCell QuotedValueList REFind REFindNoCase -syn keyword cfFunctionName contained REReplace REReplaceNoCase RJustify RTrim Rand RandRange -syn keyword cfFunctionName contained Randomize ReleaseComObject RemoveChars RepeatString Replace -syn keyword cfFunctionName contained ReplaceList ReplaceNoCase Reverse Right Round Second -syn keyword cfFunctionName contained SendGatewayMessage SetEncoding SetLocale SetProfileString -syn keyword cfFunctionName contained SetVariable Sgn Sin SpanExcluding SpanIncluding Sqr StripCR -syn keyword cfFunctionName contained StructAppend StructClear StructCopy StructCount StructDelete -syn keyword cfFunctionName contained StructFind StructFindKey StructFindValue StructGet -syn keyword cfFunctionName contained StructInsert StructIsEmpty StructKeyArray StructKeyExists -syn keyword cfFunctionName contained StructKeyList StructNew StructSort StructUpdate Tan -syn keyword cfFunctionName contained TimeFormat ToBase64 ToBinary ToScript ToString Trim UCase -syn keyword cfFunctionName contained URLDecode URLEncodedFormat URLSessionFormat Val ValueList -syn keyword cfFunctionName contained Week Wrap WriteOutput XmlChildPos XmlElemNew XmlFormat -syn keyword cfFunctionName contained XmlGetNodeType XmlNew XmlParse XmlSearch XmlTransform -syn keyword cfFunctionName contained XmlValidate Year YesNoFormat - -" Deprecated tags and functions. -syn keyword cfDeprecated contained cfauthenticate cfimpersonate cfgraph cfgraphdata -syn keyword cfDeprecated contained cfservlet cfservletparam cftextinput -syn keyword cfDeprecated contained GetK2ServerDocCount GetK2ServerDocCountLimit GetTemplatePath -syn keyword cfDeprecated contained IsK2ServerABroker IsK2ServerDocCountExceeded IsK2ServerOnline -syn keyword cfDeprecated contained ParameterExists - -syn cluster htmlTagNameCluster add=cfTagName -syn cluster htmlArgCluster add=cfArg,cfHashRegion,cfScope -syn cluster htmlPreproc add=cfHashRegion - -syn cluster cfExpressionCluster contains=cfFunctionName,cfScope,@cfOperatorCluster,cfScriptStringD,cfScriptStringS,cfScriptNumber,cfBool - -" Evaluation; skip strings ( this helps with cases like nested IIf() ) -syn region cfHashRegion start=+#+ skip=+"[^"]*"\|'[^']*'+ end=+#+ contains=@cfExpressionCluster,cfScriptParenError - -" , , , are analogous to hashmarks (implicit -" evaluation) and have 'var' -syn region cfSetRegion start="' - -" CF comments: similar to SGML comments -syn region cfComment start='' keepend contains=cfCommentTodo -syn keyword cfCommentTodo contained TODO FIXME XXX TBD WTF - -" CFscript -syn match cfScriptLineComment contained "\/\/.*$" contains=cfCommentTodo -syn region cfScriptComment contained start="/\*" end="\*/" contains=cfCommentTodo -" in CF, quotes are escaped by doubling -syn region cfScriptStringD contained start=+"+ skip=+\\\\\|""+ end=+"+ extend contains=@htmlPreproc,cfHashRegion -syn region cfScriptStringS contained start=+'+ skip=+\\\\\|''+ end=+'+ extend contains=@htmlPreproc,cfHashRegion -syn match cfScriptNumber contained "\<\d\+\>" -syn keyword cfScriptConditional contained if else -syn keyword cfScriptRepeat contained while for in -syn keyword cfScriptBranch contained break switch case default try catch continue -syn keyword cfScriptFunction contained function -syn keyword cfScriptType contained var -syn match cfScriptBraces contained "[{}]" -syn keyword cfScriptStatement contained return - -syn cluster cfScriptCluster contains=cfScriptParen,cfScriptLineComment,cfScriptComment,cfScriptStringD,cfScriptStringS,cfScriptFunction,cfScriptNumber,cfScriptRegexpString,cfScriptBoolean,cfScriptBraces,cfHashRegion,cfFunctionName,cfScope,@cfOperatorCluster,cfScriptConditional,cfScriptRepeat,cfScriptBranch,cfScriptType,@cfExpressionCluster,cfScriptStatement - -" Errors caused by wrong parenthesis; skip strings -syn region cfScriptParen contained transparent skip=+"[^"]*"\|'[^']*'+ start=+(+ end=+)+ contains=@cfScriptCluster -syn match cfScrParenError contained +)+ - -syn region cfscriptBlock matchgroup=NONE start="" end="<\/cfscript>"me=s-1 keepend contains=@cfScriptCluster,cfscriptTag,cfScrParenError -syn region cfscriptTag contained start=':p:h/sql.vim -unlet b:current_syntax -syn region cfqueryTag contained start=++ keepend contains=cfTagName,htmlTag -syn region cfSqlregion start=+]*>+ keepend end=+<\/cfquery>+me=s-1 matchgroup=NONE contains=@cfSql,cfComment,@htmlTagNameCluster,cfqueryTag - -" Define the default highlighting. -if version >= 508 || !exists("did_cf_syn_inits") - if version < 508 - let did_cf_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - HiLink cfTagName Statement - HiLink cfArg Type - HiLink cfFunctionName Function - HiLink cfHashRegion PreProc - HiLink cfComment Comment - HiLink cfCommentTodo Todo - HiLink cfOperator Operator - HiLink cfOperatorMatch Operator - HiLink cfScope Title - HiLink cfBool Constant - - HiLink cfscriptBlock Special - HiLink cfscriptTag htmlTag - HiLink cfSetRegion PreProc - HiLink cfSetLHSRegion htmlTag - HiLink cfSetTagEnd htmlTag - - HiLink cfScriptLineComment Comment - HiLink cfScriptComment Comment - HiLink cfScriptStringS String - HiLink cfScriptStringD String - HiLink cfScriptNumber cfScriptValue - HiLink cfScriptConditional Conditional - HiLink cfScriptRepeat Repeat - HiLink cfScriptBranch Conditional - HiLink cfScriptType Type - HiLink cfScriptStatement Statement - HiLink cfScriptBraces Function - HiLink cfScriptFunction Function - HiLink cfScriptError Error - HiLink cfDeprecated Error - HiLink cfScrParenError cfScriptError - - HiLink cfqueryTag htmlTag - - delcommand HiLink -endif - -let b:current_syntax = "cf" - -" vim: ts=8 sw=2 +" Vim syntax file +" Language: CFML +" Maintainer: Toby Woodwark (toby.woodwark+vim@gmail.com) +" Last Change: 2010-03-02 +" Filenames: *.cfc *.cfm +" Version: Adobe ColdFusion 9 +" Usage: This file contains both syntax definitions +" and a list of known builtin tags, functions and keywords. +" Refs - +" http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS8f0cc78011fffa71866534d11cdad96e4e-8000.html +" http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec17324-8000.html +" TODO: +" Support the limited array literal and struct literal syntax in CF8+. +" Highlight namespaced tags fom cfimport. +" Complete CF9+ cfscript support. +" Railo support. +" Options: +" d_noinclude_html - set to prevent HTML highlighting. Use this if you are not working on HTML. + +" Quit if a syntax file is already loaded. +if exists("b:current_syntax") + finish +endif + +if exists("d_noinclude_html") + " Define alternatives to the HTML syntax file. + + " Copied from html.vim - the rules for matching a CF tag match those for HTML/SGML. + " CFML syntax is more permissive when it comes to superfluous <> chars. + syn region htmlString contained start=+"+ end=+"+ contains=@htmlPreproc + syn region htmlString contained start=+'+ end=+'+ contains=@htmlPreproc + syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=@htmlPreproc + " Hacked htmlTag so that it only matches cf tags and not random <> chars. + syn region htmlEndTag start=++ contains=htmlTagN,htmlTagError + syn region htmlTag start=+<\s*cf[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,@htmlPreproc,@htmlArgCluster + syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,@htmlTagNameCluster + syn match htmlTagN contained +]<"ms=s+1 +else + " Use all the stuff from the HTML syntax file. + " This means eg HTML comments are highlighted as comments, even if they include cf tags. + runtime! syntax/html.vim +endif + +syn sync fromstart +syn sync maxlines=200 +syn case ignore + +" Scopes and keywords. +syn keyword cfScope contained cgi cffile cookie request caller this thistag +syn keyword cfScope contained cfcatch variables application server session client form url local +syn keyword cfScope contained arguments super cfhttp attributes error +syn keyword cfBool contained yes no true false + +" Operator strings. +" ColdFusion <=7: +syn keyword cfOperator contained xor eqv and or lt le lte gt ge gte equal eq neq not is mod contains +syn match cfOperatorMatch contained "+" +syn match cfOperatorMatch contained "\-" +syn match cfOperatorMatch contained "[\*\/\\\^\&][\+\-\*\/\\\^\&]\@!" +syn match cfOperatorMatch contained "\<\(not\_s\+\)\?equal\>" +syn match cfOperatorMatch contained "\" +syn match cfOperatorMatch contained "\<\(greater\|less\)\_s\+than\(\_s\+or\_s\+equal\_s\+to\)\?\>" +" ColdFusion 8: +syn keyword cfOperator contained imp +syn match cfOperatorMatch contained "[?%:!]" +syn match cfOperatorMatch contained "[\+\-\*\/\&]=" +syn match cfOperatorMatch contained "++" +syn match cfOperatorMatch contained "--" +syn match cfOperatorMatch contained "&&" +syn match cfOperatorMatch contained "||" + +syn cluster cfOperatorCluster contains=cfOperator,cfOperatorMatch + +" Custom tags called with the syntax. +syn match cfCustomTagName contained "\" +" (TODO match namespaced tags imported using cfimport, similarly.) + +" Tag names. +" ColdFusion <=7: +syn keyword cfTagName contained cfabort cfapplet cfapplication cfargument cfassociate +syn keyword cfTagName contained cfbreak cfcache cfcalendar cfcase cfcatch +syn keyword cfTagName contained cfchart cfchartdata cfchartseries cfcol cfcollection +syn keyword cfTagName contained cfcomponent cfcontent cfcookie cfdefaultcase cfdirectory +syn keyword cfTagName contained cfdocument cfdocumentitem cfdocumentsection cfdump cfelse +syn keyword cfTagName contained cfelseif cferror cfexecute cfexit cffile cfflush cfform +syn keyword cfTagName contained cfformgroup cfformitem cfftp cffunction +syn keyword cfTagName contained cfgrid cfgridcolumn cfgridrow cfgridupdate cfheader +syn keyword cfTagName contained cfhtmlhead cfhttp cfhttpparam cfif cfimport +syn keyword cfTagName contained cfinclude cfindex cfinput cfinsert cfinvoke cfinvokeargument +syn keyword cfTagName contained cfldap cflocation cflock cflog cflogin cfloginuser cflogout +syn keyword cfTagName contained cfloop cfmail cfmailparam cfmailpart cfmodule +syn keyword cfTagName contained cfNTauthenticate cfobject cfobjectcache cfoutput cfparam +syn keyword cfTagName contained cfpop cfprocessingdirective cfprocparam cfprocresult +syn keyword cfTagName contained cfproperty cfquery cfqueryparam cfregistry cfreport +syn keyword cfTagName contained cfreportparam cfrethrow cfreturn cfsavecontent cfschedule +syn keyword cfTagName contained cfscript cfsearch cfselect cfservletparam cfset +syn keyword cfTagName contained cfsetting cfsilent cfslider cfstoredproc cfswitch cftable +syn keyword cfTagName contained cftextarea cftextinput cfthrow cftimer cftrace cftransaction +syn keyword cfTagName contained cftree cftreeitem cftry cfupdate cfwddx cfxml +" ColdFusion 8: +syn keyword cfTagName contained cfajaximport cfajaxproxy cfdbinfo cfdiv cfexchangecalendar +syn keyword cfTagName contained cfexchangeconnection cfexchangecontact cfexchangefilter +syn keyword cfTagName contained cfexchangemail cfexchangetask cffeed +syn keyword cfTagName contained cfinterface cflayout cflayoutarea cfmenu cfmenuitem +syn keyword cfTagName contained cfpdf cfpdfform cfpdfformparam cfpdfparam cfpdfsubform cfpod +syn keyword cfTagName contained cfpresentation cfpresentationslide cfpresenter cfprint +syn keyword cfTagName contained cfsprydataset cfthread cftooltip cfwindow cfzip cfzipparam +" ColdFusion 9: +syn keyword cfTagName contained cfcontinue cffileupload cffinally +syn keyword cfTagName contained cfimage cfimap +syn keyword cfTagName contained cfmap cfmapitem cfmediaplayer cfmessagebox +syn keyword cfTagName contained cfprocparam cfprogressbar +syn keyword cfTagName contained cfsharepoint cfspreadsheet + +" Tag attributes. +" XXX Not updated for ColdFusion 8/9. +" These are becoming a headache to maintain, so might be removed. +syn keyword cfArg contained abort accept access accessible action addnewline addtoken +syn keyword cfArg contained agentname align appendkey appletsource application +syn keyword cfArg contained applicationtimeout applicationtoken archive +syn keyword cfArg contained argumentcollection arguments asciiextensionlist +syn keyword cfArg contained attachmentpath attributecollection attributes autowidth +syn keyword cfArg contained backgroundvisible basetag bcc bgcolor bind bindingname +syn keyword cfArg contained blockfactor body bold border branch cachedafter cachedwithin +syn keyword cfArg contained casesensitive category categorytree cc cfsqltype charset +syn keyword cfArg contained chartheight chartwidth checked class clientmanagement +syn keyword cfArg contained clientstorage codebase colheaderalign colheaderbold +syn keyword cfArg contained colheaderfont colheaderfontsize colheaderitalic colheaders +syn keyword cfArg contained colheadertextcolor collection colorlist colspacing columns +syn keyword cfArg contained completepath component condition connection contentid +syn keyword cfArg contained context contextbytes contexthighlightbegin +syn keyword cfArg contained contexthighlightend contextpassages cookiedomain criteria +syn keyword cfArg contained custom1 custom2 custom3 custom4 data dataalign +syn keyword cfArg contained databackgroundcolor datacollection datasource daynames +syn keyword cfArg contained dbname dbserver dbtype dbvarname debug default delete +syn keyword cfArg contained deletebutton deletefile delimiter delimiters description +syn keyword cfArg contained destination detail directory disabled display displayname +syn keyword cfArg contained disposition dn domain editable enablecab enablecfoutputonly +syn keyword cfArg contained enabled encoded encryption enctype enddate endrange endtime +syn keyword cfArg contained entry errorcode exception existing expand expires expireurl +syn keyword cfArg contained expression extendedinfo extends extensions external +syn keyword cfArg contained failifexists failto file filefield filename filter +syn keyword cfArg contained firstdayofweek firstrowasheaders fixnewline font fontbold +syn keyword cfArg contained fontembed fontitalic fontsize foregroundcolor format +syn keyword cfArg contained formfields formula from generateuniquefilenames getasbinary +syn keyword cfArg contained grid griddataalign gridlines groovecolor group +syn keyword cfArg contained groupcasesensitive header headeralign headerbold headerfont +syn keyword cfArg contained headerfontsize headeritalic headerlines headertextcolor +syn keyword cfArg contained height highlighthref hint href hrefkey hscroll hspace html +syn keyword cfArg contained htmltable id idletimeout img imgopen imgstyle index inline +syn keyword cfArg contained input insert insertbutton interval isolation italic item +syn keyword cfArg contained itemcolumn key keyonly label labelformat language list +syn keyword cfArg contained listgroups locale localfile log loginstorage lookandfeel +syn keyword cfArg contained mailerid mailto marginbottom marginleft marginright +syn keyword cfArg contained margintop markersize markerstyle mask max maxlength maxrows +syn keyword cfArg contained message messagenumber method mimeattach mimetype min mode +syn keyword cfArg contained modifytype monthnames multipart multiple name nameconflict +syn keyword cfArg contained namespace new newdirectory notsupported null numberformat +syn keyword cfArg contained object omit onblur onchange onclick onerror onfocus +syn keyword cfArg contained onkeydown onkeyup onload onmousedown onmouseup onreset +syn keyword cfArg contained onsubmit onvalidate operation orderby orientation output +syn keyword cfArg contained outputfile overwrite ownerpassword pageencoding pageheight +syn keyword cfArg contained pagetype pagewidth paintstyle param_1 param_2 param_3 +syn keyword cfArg contained param_4 param_5 param_6 param_7 param_8 param_9 parent +syn keyword cfArg contained parrent passive passthrough password path pattern +syn keyword cfArg contained permissions picturebar pieslicestyle port porttypename +syn keyword cfArg contained prefix preloader preservedata previouscriteria procedure +syn keyword cfArg contained protocol provider providerdsn proxybypass proxypassword +syn keyword cfArg contained proxyport proxyserver proxyuser publish query queryasroot +syn keyword cfArg contained queryposition range rebind recurse redirect referral +syn keyword cfArg contained refreshlabel remotefile replyto report requesttimeout +syn keyword cfArg contained required reset resoleurl resolveurl result resultset +syn keyword cfArg contained retrycount returnasbinary returncode returntype +syn keyword cfArg contained returnvariable roles rotated rowheaderalign rowheaderbold +syn keyword cfArg contained rowheaderfont rowheaderfontsize rowheaderitalic rowheaders +syn keyword cfArg contained rowheadertextcolor rowheaderwidth rowheight scale scalefrom +syn keyword cfArg contained scaleto scope scriptprotect scriptsrc secure securitycontext +syn keyword cfArg contained select selectcolor selected selecteddate selectedindex +syn keyword cfArg contained selectmode separator seriescolor serieslabel seriesplacement +syn keyword cfArg contained server serviceport serviceportname sessionmanagement +syn keyword cfArg contained sessiontimeout setclientcookies setcookie setdomaincookies +syn keyword cfArg contained show3d showborder showdebugoutput showerror showlegend +syn keyword cfArg contained showmarkers showxgridlines showygridlines size skin sort +syn keyword cfArg contained sortascendingbutton sortcontrol sortdescendingbutton +syn keyword cfArg contained sortxaxis source spoolenable sql src srcfile start startdate +syn keyword cfArg contained startrange startrow starttime status statuscode statustext +syn keyword cfArg contained step stoponerror style subject suggestions +syn keyword cfArg contained suppresswhitespace tablename tableowner tablequalifier +syn keyword cfArg contained taglib target task template text textcolor textqualifier +syn keyword cfArg contained throwonerror throwonerror throwonfailure throwontimeout +syn keyword cfArg contained timeout timespan tipbgcolor tipstyle title to tooltip +syn keyword cfArg contained toplevelvariable transfermode type uid unit url urlpath +syn keyword cfArg contained useragent username userpassword usetimezoneinfo validate +syn keyword cfArg contained validateat value valuecolumn values valuesdelimiter +syn keyword cfArg contained valuesdisplay var variable vertical visible vscroll vspace +syn keyword cfArg contained webservice width wmode wraptext wsdlfile xaxistitle +syn keyword cfArg contained xaxistype xoffset yaxistitle yaxistype yoffset + +" Functions. +" ColdFusion <=7: +syn keyword cfFunctionName contained ACos ASin Abs AddSOAPRequestHeader AddSOAPResponseHeader +syn keyword cfFunctionName contained ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt ArrayInsertAt +syn keyword cfFunctionName contained ArrayIsEmpty ArrayLen ArrayMax ArrayMin ArrayNew +syn keyword cfFunctionName contained ArrayPrepend ArrayResize ArraySet ArraySort ArraySum +syn keyword cfFunctionName contained ArraySwap ArrayToList Asc Atn AuthenticatedContext +syn keyword cfFunctionName contained AuthenticatedUser BinaryDecode BinaryEncode BitAnd +syn keyword cfFunctionName contained BitMaskClear BitMaskRead BitMaskSet BitNot BitOr BitSHLN +syn keyword cfFunctionName contained BitSHRN BitXor CJustify Ceiling CharsetDecode CharsetEncode +syn keyword cfFunctionName contained Chr Compare CompareNoCase Cos CreateDate CreateDateTime +syn keyword cfFunctionName contained CreateODBCDate CreateODBCDateTime CreateODBCTime +syn keyword cfFunctionName contained CreateObject CreateTime CreateTimeSpan CreateUUID DE DateAdd +syn keyword cfFunctionName contained DateCompare DateConvert DateDiff DateFormat DatePart Day +syn keyword cfFunctionName contained DayOfWeek DayOfWeekAsString DayOfYear DaysInMonth DaysInYear +syn keyword cfFunctionName contained DecimalFormat DecrementValue Decrypt DecryptBinary +syn keyword cfFunctionName contained DeleteClientVariable DirectoryExists DollarFormat Duplicate +syn keyword cfFunctionName contained Encrypt EncryptBinary Evaluate Exp ExpandPath FileExists +syn keyword cfFunctionName contained Find FindNoCase FindOneOf FirstDayOfMonth Fix FormatBaseN +syn keyword cfFunctionName contained GenerateSecretKey GetAuthUser GetBaseTagData GetBaseTagList +syn keyword cfFunctionName contained GetBaseTemplatePath GetClientVariablesList GetContextRoot +syn keyword cfFunctionName contained GetCurrentTemplatePath GetDirectoryFromPath GetEncoding +syn keyword cfFunctionName contained GetException GetFileFromPath GetFunctionList +syn keyword cfFunctionName contained GetGatewayHelper GetHttpRequestData GetHttpTimeString +syn keyword cfFunctionName contained GetLocalHostIP +syn keyword cfFunctionName contained GetLocale GetLocaleDisplayName GetMetaData GetMetricData +syn keyword cfFunctionName contained GetPageContext GetProfileSections GetProfileString +syn keyword cfFunctionName contained GetSOAPRequest GetSOAPRequestHeader GetSOAPResponse +syn keyword cfFunctionName contained GetSOAPResponseHeader GetTempDirectory GetTempFile +syn keyword cfFunctionName contained GetTickCount GetTimeZoneInfo GetToken +syn keyword cfFunctionName contained HTMLCodeFormat HTMLEditFormat Hash Hour IIf IncrementValue +syn keyword cfFunctionName contained InputBaseN Insert Int IsArray IsAuthenticated IsAuthorized +syn keyword cfFunctionName contained IsBinary IsBoolean IsCustomFunction IsDate IsDebugMode +syn keyword cfFunctionName contained IsDefined +syn keyword cfFunctionName contained IsLeapYear IsLocalHost IsNumeric +syn keyword cfFunctionName contained IsNumericDate IsObject IsProtected IsQuery IsSOAPRequest +syn keyword cfFunctionName contained IsSimpleValue IsStruct IsUserInRole IsValid IsWDDX IsXML +syn keyword cfFunctionName contained IsXmlAttribute IsXmlDoc IsXmlElem IsXmlNode IsXmlRoot +syn keyword cfFunctionName contained JSStringFormat JavaCast LCase LJustify LSCurrencyFormat +syn keyword cfFunctionName contained LSDateFormat LSEuroCurrencyFormat LSIsCurrency LSIsDate +syn keyword cfFunctionName contained LSIsNumeric LSNumberFormat LSParseCurrency LSParseDateTime +syn keyword cfFunctionName contained LSParseEuroCurrency LSParseNumber LSTimeFormat LTrim Left +syn keyword cfFunctionName contained Len ListAppend ListChangeDelims ListContains +syn keyword cfFunctionName contained ListContainsNoCase ListDeleteAt ListFind ListFindNoCase +syn keyword cfFunctionName contained ListFirst ListGetAt ListInsertAt ListLast ListLen +syn keyword cfFunctionName contained ListPrepend ListQualify ListRest ListSetAt ListSort +syn keyword cfFunctionName contained ListToArray ListValueCount ListValueCountNoCase Log Log10 +syn keyword cfFunctionName contained Max Mid Min Minute Month MonthAsString Now NumberFormat +syn keyword cfFunctionName contained ParagraphFormat ParseDateTime Pi +syn keyword cfFunctionName contained PreserveSingleQuotes Quarter QueryAddColumn QueryAddRow +syn keyword cfFunctionName contained QueryNew QuerySetCell QuotedValueList REFind REFindNoCase +syn keyword cfFunctionName contained REReplace REReplaceNoCase RJustify RTrim Rand RandRange +syn keyword cfFunctionName contained Randomize ReleaseComObject RemoveChars RepeatString Replace +syn keyword cfFunctionName contained ReplaceList ReplaceNoCase Reverse Right Round Second +syn keyword cfFunctionName contained SendGatewayMessage SetEncoding SetLocale SetProfileString +syn keyword cfFunctionName contained SetVariable Sgn Sin SpanExcluding SpanIncluding Sqr StripCR +syn keyword cfFunctionName contained StructAppend StructClear StructCopy StructCount StructDelete +syn keyword cfFunctionName contained StructFind StructFindKey StructFindValue StructGet +syn keyword cfFunctionName contained StructInsert StructIsEmpty StructKeyArray StructKeyExists +syn keyword cfFunctionName contained StructKeyList StructNew StructSort StructUpdate Tan +syn keyword cfFunctionName contained TimeFormat ToBase64 ToBinary ToScript ToString Trim UCase +syn keyword cfFunctionName contained URLDecode URLEncodedFormat URLSessionFormat Val ValueList +syn keyword cfFunctionName contained Week Wrap WriteOutput XmlChildPos XmlElemNew XmlFormat +syn keyword cfFunctionName contained XmlGetNodeType XmlNew XmlParse XmlSearch XmlTransform +syn keyword cfFunctionName contained XmlValidate Year YesNoFormat +" ColdFusion 8: +syn keyword cfFunctionName contained AjaxLink AjaxOnLoad ArrayIsDefined BinaryDecode BinaryEncode CharsetDecode CharsetEncode +syn keyword cfFunctionName contained DecryptBinary DeserializeJSON DotNetToCFType EncryptBinary FileClose FileCopy FileDelete +syn keyword cfFunctionName contained FileIsEOF FileMove FileOpen FileRead FileReadBinary FileReadLine FileSetAccessMode FileSetAttribute +syn keyword cfFunctionName contained FileSetLastModified FileWrite GenerateSecretKey GetGatewayHelper GetAuthUser GetComponentMetaData +syn keyword cfFunctionName contained GetContextRoot GetEncoding GetFileInfo GetLocaleDisplayName GetLocalHostIP GetMetaData +syn keyword cfFunctionName contained GetPageContext GetPrinterInfo GetProfileSections GetReadableImageFormats GetSOAPRequest +syn keyword cfFunctionName contained GetSOAPRequestHeader GetSOAPResponse GetSOAPResponseHeader GetUserRoles GetWriteableImageFormats +syn keyword cfFunctionName contained ImageAddBorder ImageBlur ImageClearRect ImageCopy ImageCrop ImageDrawArc ImageDrawBeveledRect +syn keyword cfFunctionName contained ImageDrawCubicCurve ImageDrawPoint ImageDrawLine ImageDrawLines ImageDrawOval +syn keyword cfFunctionName contained ImageDrawQuadraticCurve ImageDrawRect ImageDrawRoundRect ImageDrawText ImageFlip ImageGetBlob +syn keyword cfFunctionName contained ImageGetBufferedImage ImageGetEXIFMetadata ImageGetEXIFTag ImageGetHeight ImageGetIPTCMetadata +syn keyword cfFunctionName contained ImageGetIPTCTag ImageGetWidth ImageGrayscale ImageInfo ImageNegative ImageNew ImageOverlay +syn keyword cfFunctionName contained ImagePaste ImageRead ImageReadBase64 ImageResize ImageRotate ImageRotateDrawingAxis ImageScaleToFit +" ColdFusion 9: +syn keyword cfFunctionName contained ApplicationStop ArrayContains ArrayDelete ArrayFind ArrayFindNoCase IsSpreadsheetFile +syn keyword cfFunctionName contained IsSpreadsheetObject FileSkipBytes Location ObjectLoad SpreadsheetFormatColumn +syn keyword cfFunctionName contained SpreadsheetFormatColumns SpreadsheetFormatRow SpreadsheetFormatRows SpreadsheetGetCellComment +syn keyword cfFunctionName contained CacheGetAllIds CacheGetMetadata CacheGetProperties CacheGet CachePut ObjectSave ORMClearSession +syn keyword cfFunctionName contained ORMCloseSession ORMEvictQueries ORMEvictCollection SpreadsheetGetCellFormula SpreadsheetGetCellValue +syn keyword cfFunctionName contained SpreadsheetInfo SpreadsheetMergeCells SpreadsheetNew CacheRemove CacheSetProperties DirectoryCreate +syn keyword cfFunctionName contained DirectoryDelete DirectoryExists ORMEvictEntity ORMEvictQueries ORMExecuteQuery ORMFlush +syn keyword cfFunctionName contained ORMGetSession SpreadsheetRead SpreadsheetReadBinary SpreadsheetSetActiveSheetNumber +syn keyword cfFunctionName contained SpreadsheetSetCellComment SpreadsheetSetCellFormula DirectoryList DirectoryRename EntityDelete +syn keyword cfFunctionName contained EntityLoad EntityLoadByExample ORMGetSessionFactory ORMReload ObjectEquals SpreadsheetAddColumn +syn keyword cfFunctionName contained SpreadsheetAddFreezePane SpreadsheetSetCellValue SpreadsheetSetActiveSheet SpreadsheetSetFooter +syn keyword cfFunctionName contained SpreadsheetSetHeader SpreadsheetSetColumnWidth EntityLoadByPK EntityMerge EntityNew EntityReload +syn keyword cfFunctionName contained EntitySave SpreadsheetAddImage SpreadsheetAddInfo SpreadsheetAddRow SpreadsheetAddRows +syn keyword cfFunctionName contained SpreadsheetAddSplitPane SpreadsheetShiftColumns SpreadsheetShiftRows SpreadsheetSetRowHeight +syn keyword cfFunctionName contained SpreadsheetWrite Trace FileDelete FileSeek FileWriteLine GetFunctionCalledName GetVFSMetaData IsIPv6 +syn keyword cfFunctionName contained IsNull SpreadsheetCreateSheet SpreadsheetDeleteColumn SpreadsheetDeleteColumns SpreadsheetDeleteRow +syn keyword cfFunctionName contained SpreadsheetDeleteRows SpreadsheetFormatCell TransactionCommit TransactionRollback +syn keyword cfFunctionName contained TransactionSetSavePoint ThreadTerminate ThreadJoin Throw Writedump Writelog + +" Deprecated or obsoleted tags and functions. +syn keyword cfDeprecatedTag contained cfauthenticate cfimpersonate cfgraph cfgraphdata +syn keyword cfDeprecatedTag contained cfservlet cfservletparam cftextinput +syn keyword cfDeprecatedTag contained cfinternaladminsecurity cfnewinternaladminsecurity +syn keyword cfDeprecatedFunction contained GetK2ServerDocCount GetK2ServerDocCountLimit GetTemplatePath +syn keyword cfDeprecatedFunction contained IsK2ServerABroker IsK2ServerDocCountExceeded IsK2ServerOnline +syn keyword cfDeprecatedFunction contained ParameterExists AuthenticatedContext AuthenticatedUser +syn keyword cfDeprecatedFunction contained isAuthenticated isAuthorized isProtected + +" Add to the HTML clusters. +syn cluster htmlTagNameCluster add=cfTagName,cfCustomTagName,cfDeprecatedTag +syn cluster htmlArgCluster add=cfArg,cfHashRegion,cfScope +syn cluster htmlPreproc add=cfHashRegion + +syn cluster cfExpressionCluster contains=cfFunctionName,cfScope,@cfOperatorCluster,cfScriptStringD,cfScriptStringS,cfScriptNumber,cfBool,cfComment + +" Evaluation; skip strings ( this helps with cases like nested IIf() ) +" containedin to add to the TOP of cfOutputRegion. +syn region cfHashRegion start=+#+ skip=+"[^"]*"\|'[^']*'+ end=+#+ contained containedin=cfOutputRegion contains=@cfExpressionCluster,cfScriptParenError + +" Hashmarks are significant inside cfoutput tags. +" cfoutput tags may be nested indefinitely. +syn region cfOutputRegion matchgroup=NONE transparent start=++ end=++ contains=TOP + +" , , , are analogous to hashmarks (implicit +" evaluation) and have 'var' +syn region cfSetRegion start="" start="" start="" start="" end='>' keepend contains=@cfExpressionCluster,cfSetLHSRegion,cfSetTagEnd,cfScriptStatement +syn region cfSetLHSRegion contained start="' + +" CF comments: similar to SGML comments, but can be nested. +syn region cfComment start='' contains=cfCommentTodo,cfComment +syn keyword cfCommentTodo contained TODO FIXME XXX TBD WTF + +" CFscript +" TODO better support for new component/function def syntax +" TODO better support for 'new' +" TODO highlight metadata (@ ...) inside comments. +syn match cfScriptLineComment contained "\/\/.*$" contains=cfCommentTodo +syn region cfScriptComment contained start="/\*" end="\*/" contains=cfCommentTodo +syn match cfScriptBraces contained "[{}]" +syn keyword cfScriptStatement contained return var +" in CF, quotes are escaped by doubling +syn region cfScriptStringD contained start=+"+ skip=+\\\\\|""+ end=+"+ extend contains=@htmlPreproc,cfHashRegion +syn region cfScriptStringS contained start=+'+ skip=+\\\\\|''+ end=+'+ extend contains=@htmlPreproc,cfHashRegion +syn match cfScriptNumber contained "\<\d\+\>" +syn keyword cfScriptConditional contained if else +syn keyword cfScriptRepeat contained while for in +syn keyword cfScriptBranch contained break switch case default try catch continue finally +syn keyword cfScriptKeyword contained function +" argumentCollection is a special argument to function calls +syn keyword cfScriptSpecial contained argumentcollection +" ColdFusion 9: +syn keyword cfScriptStatement contained new import +" CFscript equivalents of some tags +syn keyword cfScriptKeyword contained abort component exit import include +syn keyword cfScriptKeyword contained interface param pageencoding property rethrow thread transaction +" function/component syntax +syn keyword cfScriptSpecial contained required extends + + +syn cluster cfScriptCluster contains=cfScriptParen,cfScriptLineComment,cfScriptComment,cfScriptStringD,cfScriptStringS,cfScriptFunction,cfScriptNumber,cfScriptRegexpString,cfScriptBoolean,cfScriptBraces,cfHashRegion,cfFunctionName,cfDeprecatedFunction,cfScope,@cfOperatorCluster,cfScriptConditional,cfScriptRepeat,cfScriptBranch,@cfExpressionCluster,cfScriptStatement,cfScriptSpecial,cfScriptKeyword + +" Errors caused by wrong parenthesis; skip strings +syn region cfScriptParen contained transparent skip=+"[^"]*"\|'[^']*'+ start=+(+ end=+)+ contains=@cfScriptCluster +syn match cfScrParenError contained +)+ + +syn region cfscriptBlock matchgroup=NONE start="" end="<\/cfscript>"me=s-1 keepend contains=@cfScriptCluster,cfscriptTag,cfScrParenError +syn region cfscriptTag contained start='+ keepend contains=cfTagName,htmlTag +syn region cfSqlregion start=+]*>+ keepend end=++me=s-1 matchgroup=NONE contains=@cfSql,cfComment,@htmlTagNameCluster,cfqueryTag,cfHashRegion + +" Define the highlighting. +command -nargs=+ CfHiLink hi def link + +if exists("d_noinclude_html") + " The default html-style highlighting copied from html.vim. + CfHiLink htmlTag Function + CfHiLink htmlEndTag Identifier + CfHiLink htmlArg Type + CfHiLink htmlTagName htmlStatement + CfHiLink htmlValue String + CfHiLink htmlPreProc PreProc + CfHiLink htmlString String + CfHiLink htmlStatement Statement + CfHiLink htmlValue String + CfHiLink htmlTagError htmlError + CfHiLink htmlError Error +endif + +CfHiLink cfTagName Statement +CfHiLink cfCustomTagName Statement +CfHiLink cfArg Type +CfHiLink cfFunctionName Function +CfHiLink cfHashRegion PreProc +CfHiLink cfComment Comment +CfHiLink cfCommentTodo Todo +CfHiLink cfOperator Operator +CfHiLink cfOperatorMatch Operator +CfHiLink cfScope Title +CfHiLink cfBool Constant + +CfHiLink cfscriptBlock Special +CfHiLink cfscriptTag htmlTag +CfHiLink cfSetRegion PreProc +CfHiLink cfSetLHSRegion htmlTag +CfHiLink cfSetTagEnd htmlTag + +CfHiLink cfScriptLineComment Comment +CfHiLink cfScriptComment Comment +CfHiLink cfScriptStringS String +CfHiLink cfScriptStringD String +CfHiLink cfScriptNumber cfScriptValue +CfHiLink cfScriptConditional Conditional +CfHiLink cfScriptRepeat Repeat +CfHiLink cfScriptBranch Conditional +CfHiLink cfScriptSpecial Type +CfHiLink cfScriptStatement Statement +CfHiLink cfScriptBraces Function +CfHiLink cfScriptKeyword Function +CfHiLink cfScriptError Error +CfHiLink cfDeprecatedTag Error +CfHiLink cfDeprecatedFunction Error +CfHiLink cfScrParenError cfScriptError + +CfHiLink cfqueryTag htmlTag + +delcommand CfHiLink + +let b:current_syntax = "cf" + +" vim: nowrap sw=2 ts=8 noet diff --git a/runtime/syntax/cucumber.vim b/runtime/syntax/cucumber.vim new file mode 100644 index 00000000..258471a5 --- /dev/null +++ b/runtime/syntax/cucumber.vim @@ -0,0 +1,117 @@ +" Vim syntax file +" Language: Cucumber +" Maintainer: Tim Pope +" Filenames: *.feature + +if exists("b:current_syntax") + finish +endif + +syn case match +syn sync minlines=20 + +let g:cucumber_languages = { + \"en": {"and": "And\\>", "background": "Background\\>", "but": "But\\>", "examples": "Scenarios\\>\\|Examples\\>", "feature": "Feature\\>", "given": "Given\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Outline\\>", "then": "Then\\>", "when": "When\\>"}, + \"ar": {"and": "\\%u0648\\>", "background": "\\%u0627\\%u0644\\%u062e\\%u0644\\%u0641\\%u064a\\%u0629\\>", "but": "\\%u0644\\%u0643\\%u0646\\>", "examples": "\\%u0627\\%u0645\\%u062b\\%u0644\\%u0629\\>", "feature": "\\%u062e\\%u0627\\%u0635\\%u064a\\%u0629\\>", "given": "\\%u0628\\%u0641\\%u0631\\%u0636\\>", "scenario": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648\\>", "scenario_outline": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648 \\%u0645\\%u062e\\%u0637\\%u0637\\>", "then": "\\%u0627\\%u0630\\%u0627\\%u064b\\>\\|\\%u062b\\%u0645\\>", "when": "\\%u0639\\%u0646\\%u062f\\%u0645\\%u0627\\>\\|\\%u0645\\%u062a\\%u0649\\>"}, + \"bg": {"and": "\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u0438\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\>", "but": "\\%u041d\\%u043e\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442\\>", "given": "\\%u0414\\%u0430\\%u0434\\%u0435\\%u043d\\%u043e\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0420\\%u0430\\%u043c\\%u043a\\%u0430 \\%u043d\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "then": "\\%u0422\\%u043e\\>", "when": "\\%u041a\\%u043e\\%u0433\\%u0430\\%u0442\\%u043e\\>"}, + \"cat": {"and": "I\\>", "background": "Antecedents\\>\\|Rerefons\\>", "but": "Per\\%u00f2\\>", "examples": "Exemples\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Donada\\>\\|Donat\\>", "scenario": "Escenari\\>", "scenario_outline": "Esquema de l'escenari\\>", "then": "Aleshores\\>", "when": "Quan\\>"}, + \"cs": {"and": "A tak\\%u00e9\\>\\|A\\>", "background": "Pozad\\%u00ed\\>\\|Kontext\\>", "but": "Ale\\>", "examples": "P\\%u0159\\%u00edklady\\>", "feature": "Po\\%u017eadavek\\>", "given": "Pokud\\>", "scenario": "Sc\\%u00e9n\\%u00e1\\%u0159\\>", "scenario_outline": "N\\%u00e1\\%u010drt Sc\\%u00e9n\\%u00e1\\%u0159e\\>\\|Osnova sc\\%u00e9n\\%u00e1\\%u0159e\\>", "then": "Pak\\>", "when": "Kdy\\%u017e\\>"}, + \"cy": {"and": "A\\>", "background": "Cefndir\\>", "but": "Ond\\>", "examples": "Enghreifftiau\\>", "feature": "Arwedd\\>", "given": "anrhegedig a\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Amlinellol\\>", "then": "Yna\\>", "when": "Pryd\\>"}, + \"da": {"and": "Og\\>", "background": "Baggrund\\>", "but": "Men\\>", "examples": "Eksempler\\>", "feature": "Egenskab\\>", "given": "Givet\\>", "scenario": "Scenarie\\>", "scenario_outline": "Abstrakt Scenario\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"}, + \"de": {"and": "Und\\>", "background": "Grundlage\\>", "but": "Aber\\>", "examples": "Beispiele\\>", "feature": "Funktionalit\\%u00e4t\\>", "given": "Gegeben sei\\>", "scenario": "Szenario\\>", "scenario_outline": "Szenariogrundriss\\>", "then": "Dann\\>", "when": "Wenn\\>"}, + \"en-au": {"and": "N\\>", "background": "Background\\>", "but": "Cept\\>", "examples": "Cobber\\>", "feature": "Crikey\\>", "given": "Ya know how\\>", "scenario": "Mate\\>", "scenario_outline": "Blokes\\>", "then": "Ya gotta\\>", "when": "When\\>"}, + \"en-lol": {"and": "AN\\>", "background": "B4\\>", "but": "BUT\\>", "examples": "EXAMPLZ\\>", "feature": "OH HAI\\>", "given": "I CAN HAZ\\>", "scenario": "MISHUN\\>", "scenario_outline": "MISHUN SRSLY\\>", "then": "DEN\\>", "when": "WEN\\>"}, + \"es": {"and": "Y\\>", "background": "Antecedentes\\>", "but": "Pero\\>", "examples": "Ejemplos\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Dado\\>", "scenario": "Escenario\\>", "scenario_outline": "Esquema del escenario\\>", "then": "Entonces\\>", "when": "Cuando\\>"}, + \"et": {"and": "Ja\\>", "background": "Taust\\>", "but": "Kuid\\>", "examples": "Juhtumid\\>", "feature": "Omadus\\>", "given": "Eeldades\\>", "scenario": "Stsenaarium\\>", "scenario_outline": "Raamstsenaarium\\>", "then": "Siis\\>", "when": "Kui\\>"}, + \"fi": {"and": "Ja\\>", "background": "Tausta\\>", "but": "Mutta\\>", "examples": "Tapaukset\\>", "feature": "Ominaisuus\\>", "given": "Oletetaan\\>", "scenario": "Tapaus\\>", "scenario_outline": "Tapausaihio\\>", "then": "Niin\\>", "when": "Kun\\>"}, + \"fr": {"and": "Et\\>", "background": "Contexte\\>", "but": "Mais\\>", "examples": "Exemples\\>", "feature": "Fonctionnalit\\%u00e9\\>", "given": "Etant donn\\%u00e9\\>\\|Soit\\>", "scenario": "Sc\\%u00e9nario\\>", "scenario_outline": "Plan du sc\\%u00e9nario\\>\\|Plan du Sc\\%u00e9nario\\>", "then": "Alors\\>", "when": "Lorsqu'\\|Lorsque\\>\\|Quand\\>"}, + \"he": {"and": "\\%u05d5\\%u05d2\\%u05dd\\>", "background": "\\%u05e8\\%u05e7\\%u05e2\\>", "but": "\\%u05d0\\%u05d1\\%u05dc\\>", "examples": "\\%u05d3\\%u05d5\\%u05d2\\%u05de\\%u05d0\\%u05d5\\%u05ea\\>", "feature": "\\%u05ea\\%u05db\\%u05d5\\%u05e0\\%u05d4\\>", "given": "\\%u05d1\\%u05d4\\%u05d9\\%u05e0\\%u05ea\\%u05df\\>", "scenario": "\\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9\\>", "scenario_outline": "\\%u05ea\\%u05d1\\%u05e0\\%u05d9\\%u05ea \\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9\\>", "then": "\\%u05d0\\%u05d6\\%u05d9\\>\\|\\%u05d0\\%u05d6\\>", "when": "\\%u05db\\%u05d0\\%u05e9\\%u05e8\\>"}, + \"hr": {"and": "I\\>", "background": "Pozadina\\>", "but": "Ali\\>", "examples": "Scenariji\\>\\|Primjeri\\>", "feature": "Mogu\\%u0107nost\\>\\|Mogucnost\\>\\|Osobina\\>", "given": "Zadano\\>\\|Zadani\\>\\|Zadan\\>", "scenario": "Scenarij\\>", "scenario_outline": "Koncept\\>\\|Skica\\>", "then": "Onda\\>", "when": "Kada\\>\\|Kad\\>"}, + \"hu": {"and": "\\%u00c9s\\>", "background": "H\\%u00e1tt\\%u00e9r\\>", "but": "De\\>", "examples": "P\\%u00e9ld\\%u00e1k\\>", "feature": "Jellemz\\%u0151\\>", "given": "Ha\\>", "scenario": "Forgat\\%u00f3k\\%u00f6nyv\\>", "scenario_outline": "Forgat\\%u00f3k\\%u00f6nyv v\\%u00e1zlat\\>", "then": "Akkor\\>", "when": "Majd\\>"}, + \"id": {"and": "Dan\\>", "background": "Dasar\\>", "but": "Tapi\\>", "examples": "Contoh\\>", "feature": "Fitur\\>", "given": "Dengan\\>", "scenario": "Skenario\\>", "scenario_outline": "Skenario konsep\\>", "then": "Maka\\>", "when": "Ketika\\>"}, + \"it": {"and": "E\\>", "background": "Contesto\\>", "but": "Ma\\>", "examples": "Esempi\\>", "feature": "Funzionalit\\%u00e0\\>", "given": "Dato\\>", "scenario": "Scenario\\>", "scenario_outline": "Schema dello scenario\\>", "then": "Allora\\>", "when": "Quando\\>"}, + \"ja": {"and": "\\%u304b\\%u3064", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u3057\\%u304b\\%u3057\\|\\%u305f\\%u3060\\%u3057\\|\\%u4f46\\%u3057", "examples": "\\%u30b5\\%u30f3\\%u30d7\\%u30eb\\>\\|\\%u4f8b\\>", "feature": "\\%u30d5\\%u30a3\\%u30fc\\%u30c1\\%u30e3\\>\\|\\%u6a5f\\%u80fd\\>", "given": "\\%u524d\\%u63d0", "scenario": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\>", "scenario_outline": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30a2\\%u30a6\\%u30c8\\%u30e9\\%u30a4\\%u30f3\\>\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\%u30fc\\%u30c8\\>\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\>\\|\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\>", "then": "\\%u306a\\%u3089\\%u3070", "when": "\\%u3082\\%u3057"}, + \"ko": {"and": "\\%uadf8\\%ub9ac\\%uace0", "background": "\\%ubc30\\%uacbd\\>", "but": "\\%ud558\\%uc9c0\\%ub9cc", "examples": "\\%uc608\\>", "feature": "\\%uae30\\%ub2a5\\>", "given": "\\%uc870\\%uac74", "scenario": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624\\>", "scenario_outline": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624 \\%uac1c\\%uc694\\>", "then": "\\%uadf8\\%ub7ec\\%uba74", "when": "\\%ub9cc\\%uc77c"}, + \"lt": {"and": "Ir\\>", "background": "Kontekstas\\>", "but": "Bet\\>", "examples": "Pavyzd\\%u017eiai\\>\\|Scenarijai\\>\\|Variantai\\>", "feature": "Savyb\\%u0117\\>", "given": "Duota\\>", "scenario": "Scenarijus\\>", "scenario_outline": "Scenarijaus \\%u0161ablonas\\>", "then": "Tada\\>", "when": "Kai\\>"}, + \"lv": {"and": "Un\\>", "background": "Situ\\%u0101cija\\>\\|Konteksts\\>", "but": "Bet\\>", "examples": "Piem\\%u0113ri\\>\\|Paraugs\\>", "feature": "Funkcionalit\\%u0101te\\>\\|F\\%u012b\\%u010da\\>", "given": "Kad\\>", "scenario": "Scen\\%u0101rijs\\>", "scenario_outline": "Scen\\%u0101rijs p\\%u0113c parauga\\>", "then": "Tad\\>", "when": "Ja\\>"}, + \"nl": {"and": "En\\>", "background": "Achtergrond\\>", "but": "Maar\\>", "examples": "Voorbeelden\\>", "feature": "Functionaliteit\\>", "given": "Gegeven\\>\\|Stel\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstract Scenario\\>", "then": "Dan\\>", "when": "Als\\>"}, + \"no": {"and": "Og\\>", "background": "Bakgrunn\\>", "but": "Men\\>", "examples": "Eksempler\\>", "feature": "Egenskap\\>", "given": "Gitt\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"}, + \"pl": {"and": "Oraz\\>", "background": "Za\\%u0142o\\%u017cenia\\>", "but": "Ale\\>", "examples": "Przyk\\%u0142ady\\>", "feature": "W\\%u0142a\\%u015bciwo\\%u015b\\%u0107\\>", "given": "Zak\\%u0142adaj\\%u0105c\\>", "scenario": "Scenariusz\\>", "scenario_outline": "Szablon scenariusza\\>", "then": "Wtedy\\>", "when": "Je\\%u017celi\\>"}, + \"pt": {"and": "E\\>", "background": "Contexto\\>", "but": "Mas\\>", "examples": "Exemplos\\>", "feature": "Funcionalidade\\>", "given": "Dado\\>", "scenario": "Cen\\%u00e1rio\\>\\|Cenario\\>", "scenario_outline": "Esquema do Cen\\%u00e1rio\\>\\|Esquema do Cenario\\>", "then": "Ent\\%u00e3o\\>\\|Entao\\>", "when": "Quando\\>"}, + \"ro": {"and": "Si\\>", "background": "Conditii\\>", "but": "Dar\\>", "examples": "Exemplele\\>", "feature": "Functionalitate\\>", "given": "Daca\\>", "scenario": "Scenariu\\>", "scenario_outline": "Scenariul de sablon\\>", "then": "Atunci\\>", "when": "Cand\\>"}, + \"ro2": {"and": "\\%u0218i\\>", "background": "Condi\\%u0163ii\\>", "but": "Dar\\>", "examples": "Exemplele\\>", "feature": "Func\\%u021bionalitate\\>", "given": "Dac\\%u0103\\>", "scenario": "Scenariu\\>", "scenario_outline": "Scenariul de \\%u015fablon\\>", "then": "Atunci\\>", "when": "C\\%u00e2nd\\>"}, + \"ru": {"and": "\\%u041a \\%u0442\\%u043e\\%u043c\\%u0443 \\%u0436\\%u0435\\>\\|\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u044b\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\>", "but": "\\%u041d\\%u043e\\>\\|\\%u0410\\>", "examples": "\\%u0417\\%u043d\\%u0430\\%u0447\\%u0435\\%u043d\\%u0438\\%u044f\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\>", "given": "\\%u0414\\%u043e\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u044f\\>", "then": "\\%u0422\\%u043e\\>", "when": "\\%u0415\\%u0441\\%u043b\\%u0438\\>"}, + \"se": {"and": "Och\\>", "background": "Bakgrund\\>", "but": "Men\\>", "examples": "Exempel\\>", "feature": "Egenskap\\>", "given": "Givet\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e4r\\>"}, + \"sk": {"and": "A\\>", "background": "Pozadie\\>", "but": "Ale\\>", "examples": "Pr\\%u00edklady\\>", "feature": "Po\\%u017eiadavka\\>", "given": "Pokia\\%u013e\\>", "scenario": "Scen\\%u00e1r\\>", "scenario_outline": "N\\%u00e1\\%u010drt Scen\\%u00e1ru\\>", "then": "Tak\\>", "when": "Ke\\%u010f\\>"}, + \"sr": {"and": "\\%u0418\\>", "background": "\\%u041a\\%u043e\\%u043d\\%u0442\\%u0435\\%u043a\\%u0441\\%u0442\\>\\|\\%u041f\\%u043e\\%u0437\\%u0430\\%u0434\\%u0438\\%u043d\\%u0430\\>\\|\\%u041e\\%u0441\\%u043d\\%u043e\\%u0432\\%u0430\\>", "but": "\\%u0410\\%u043b\\%u0438\\>", "examples": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0438\\>\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442\\>\\|\\%u041c\\%u043e\\%u0433\\%u0443\\%u045b\\%u043d\\%u043e\\%u0441\\%u0442\\>\\|\\%u041e\\%u0441\\%u043e\\%u0431\\%u0438\\%u043d\\%u0430\\>", "given": "\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u043e\\>\\|\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u0435\\>\\|\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u0438\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u043e\\>\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0430\\>\\|\\%u041a\\%u043e\\%u043d\\%u0446\\%u0435\\%u043f\\%u0442\\>\\|\\%u0421\\%u043a\\%u0438\\%u0446\\%u0430\\>", "then": "\\%u041e\\%u043d\\%u0434\\%u0430\\>", "when": "\\%u041a\\%u0430\\%u0434\\%u0430\\>\\|\\%u041a\\%u0430\\%u0434\\>"}, + \"sr-Latn": {"and": "I\\>", "background": "Kontekst\\>\\|Pozadina\\>\\|Osnova\\>", "but": "Ali\\>", "examples": "Scenariji\\>\\|Primeri\\>", "feature": "Mogu\\%u0107nost\\>\\|Funkcionalnost\\>\\|Mogucnost\\>\\|Osobina\\>", "given": "Zadato\\>\\|Zadate\\>\\|Zatati\\>", "scenario": "Scenario\\>\\|Primer\\>", "scenario_outline": "Struktura scenarija\\>\\|Koncept\\>\\|Skica\\>", "then": "Onda\\>", "when": "Kada\\>\\|Kad\\>"}, + \"tr": {"and": "Ve\\>", "background": "Ge\\%u00e7mi\\%u015f\\>", "but": "Fakat\\>\\|Ama\\>", "examples": "\\%u00d6rnekler\\>", "feature": "\\%u00d6zellik\\>", "given": "Diyelim ki\\>", "scenario": "Senaryo\\>", "scenario_outline": "Senaryo tasla\\%u011f\\%u0131\\>", "then": "O zaman\\>", "when": "E\\%u011fer ki\\>"}, + \"uz": {"and": "\\%u0412\\%u0430\\>", "background": "\\%u0422\\%u0430\\%u0440\\%u0438\\%u0445\\>", "but": "\\%u041b\\%u0435\\%u043a\\%u0438\\%u043d\\>\\|\\%u0411\\%u0438\\%u0440\\%u043e\\%u043a\\>\\|\\%u0410\\%u043c\\%u043c\\%u043e\\>", "examples": "\\%u041c\\%u0438\\%u0441\\%u043e\\%u043b\\%u043b\\%u0430\\%u0440\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\>", "given": "\\%u0410\\%u0433\\%u0430\\%u0440\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439 \\%u0441\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430\\%u0441\\%u0438\\>", "then": "\\%u0423\\%u043d\\%u0434\\%u0430\\>", "when": "\\%u0410\\%u0433\\%u0430\\%u0440\\>"}, + \"vi": {"and": "V\\%u00e0\\>", "background": "B\\%u1ed1i c\\%u1ea3nh\\>", "but": "Nh\\%u01b0ng\\>", "examples": "D\\%u1eef li\\%u1ec7u\\>", "feature": "T\\%u00ednh n\\%u0103ng\\>", "given": "Bi\\%u1ebft\\>\\|Cho\\>", "scenario": "T\\%u00ecnh hu\\%u1ed1ng\\>\\|K\\%u1ecbch b\\%u1ea3n\\>", "scenario_outline": "Khung t\\%u00ecnh hu\\%u1ed1ng\\>\\|Khung k\\%u1ecbch b\\%u1ea3n\\>", "then": "Th\\%u00ec\\>", "when": "Khi\\>"}, + \"zh-CN": {"and": "\\%u800c\\%u4e14", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u5982", "scenario": "\\%u573a\\%u666f\\>", "scenario_outline": "\\%u573a\\%u666f\\%u5927\\%u7eb2\\>", "then": "\\%u90a3\\%u4e48", "when": "\\%u5f53"}, + \"zh-TW": {"and": "\\%u800c\\%u4e14\\|\\%u4e26\\%u4e14", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u8a2d", "scenario": "\\%u5834\\%u666f\\>\\|\\%u5287\\%u672c\\>", "scenario_outline": "\\%u5834\\%u666f\\%u5927\\%u7db1\\>\\|\\%u5287\\%u672c\\%u5927\\%u7db1\\>", "then": "\\%u90a3\\%u9ebc", "when": "\\%u7576"}} + +function! s:pattern(key) + let language = matchstr(getline(1),'#\s*language:\s*\zs\S\+') + if has_key(g:cucumber_languages, language) + let languages = [g:cucumber_languages[language]] + else + let languages = values(g:cucumber_languages) + end + return '\<\%('.join(map(languages,'get(v:val,a:key,"\\%(a\\&b\\)")'),'\|').'\)' +endfunction + +function! s:Add(name) + let next = " skipempty skipwhite nextgroup=".join(map(["Region","AndRegion","ButRegion","Comment","Table"],'"cucumber".a:name.v:val'),",") + exe "syn region cucumber".a:name.'Region matchgroup=cucumber'.a:name.' start="\%(^\s*\)\@<=\%('.s:pattern(tolower(a:name)).'\)" end="$"'.next + exe 'syn region cucumber'.a:name.'AndRegion matchgroup=cucumber'.a:name.'And start="\%(^\s*\)\@<='.s:pattern('and').'" end="$" contained'.next + exe 'syn region cucumber'.a:name.'ButRegion matchgroup=cucumber'.a:name.'But start="\%(^\s*\)\@<='.s:pattern('but').'" end="$" contained'.next + exe 'syn match cucumber'.a:name.'Comment "\%(^\s*\)\@<=#.*" contained'.next + exe 'syn match cucumber'.a:name.'Table "\%(^\s*\)\@<=|.*" contained contains=cucumberDelimiter'.next + exe 'hi def link cucumber'.a:name.'Comment cucumberComment' + exe 'hi def link cucumber'.a:name.'But cucumber'.a:name.'And' + exe 'hi def link cucumber'.a:name.'And cucumber'.a:name + exe 'syn cluster cucumberStepRegions add=cucumber'.a:name.'Region,cucumber'.a:name.'AndRegion,cucumber'.a:name.'ButRegion' +endfunction + +syn match cucumberComment "\%(^\s*\)\@<=#.*" +syn match cucumberComment "\%(\%^\s*\)\@<=#.*" contains=cucumberLanguage +syn match cucumberLanguage "\%(#\s*\)\@<=language:" contained +syn match cucumberUnparsed "\S.*" nextgroup=cucumberUnparsedComment,cucumberUnparsed,cucumberTags,cucumberBackground,cucumberScenario,cucumberScenarioOutline,cucumberExamples skipwhite skipempty contained +syn match cucumberUnparsedComment "#.*" nextgroup=cucumberUnparsedComment,cucumberUnparsed,cucumberTags,cucumberBackground,cucumberScenario,cucumberScenarioOutline,cucumberExamples skipwhite skipempty contained + +exe 'syn match cucumberFeature "\%(^\s*\)\@<='.s:pattern('feature').':" nextgroup=cucumberUnparsedComment,cucumberUnparsed,cucumberBackground,cucumberScenario,cucumberScenarioOutline,cucumberExamples skipwhite skipempty' +exe 'syn match cucumberBackground "\%(^\s*\)\@<='.s:pattern('background').':"' +exe 'syn match cucumberScenario "\%(^\s*\)\@<='.s:pattern('scenario').':"' +exe 'syn match cucumberScenarioOutline "\%(^\s*\)\@<='.s:pattern('scenario_outline').':"' +exe 'syn match cucumberExamples "\%(^\s*\)\@<='.s:pattern('examples').':" nextgroup=cucumberExampleTable skipempty skipwhite' + +syn match cucumberPlaceholder "<[^<>]*>" contained containedin=@cucumberStepRegions +syn match cucumberExampleTable "\%(^\s*\)\@<=|.*" contains=cucumberDelimiter +syn match cucumberDelimiter "|" contained +syn match cucumberTags "\%(^\s*\)\@<=\%(@[^@[:space:]]\+\s\+\)*@[^@[:space:]]\+\s*$" +syn region cucumberString start=+\%(^\s*\)\@<="""+ end=+"""+ + +call s:Add('Then') +call s:Add('When') +call s:Add('Given') + +hi def link cucumberUnparsedComment cucumberComment +hi def link cucumberComment Comment +hi def link cucumberLanguage SpecialComment +hi def link cucumberFeature Macro +hi def link cucumberBackground Define +hi def link cucumberScenario Define +hi def link cucumberScenarioOutline Define +hi def link cucumberExamples Define +hi def link cucumberPlaceholder Constant +hi def link cucumberDelimiter Delimiter +hi def link cucumberTags Tag +hi def link cucumberString String +hi def link cucumberGiven Conditional +hi def link cucumberWhen Function +hi def link cucumberThen Type + +let b:current_syntax = "cucumber" + +" vim:set sts=2 sw=2: -- 2.11.4.GIT