Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
docs:vim:syntax:progress [2009/01/20 00:16] – created billhdocs:vim:syntax:progress [2010/05/12 13:21] (current) billh
Line 2: Line 2:
   * location: $VIMFILES/after/syntax/progress.vim   * location: $VIMFILES/after/syntax/progress.vim
 <code> <code>
 +" fix problems with nested comments
 +try | %s/\*\/\*\//\*\/ \*\//g | catch /^Vim\%((\a\+)\)\=:E/ | endtry
 +
 syn clear syn clear
 syn case ignore syn case ignore
  
-syn keyword keyword if then else for each next run do find +syn keyword keyword not run find format where like put control index field initial no-lock exclusive-lock no-error no-wait by yes no leave view assign create release available delete first return delimiter begins display down with page width no-box no-labels output quit to as view-as alert-box error message import export unformatted from 
-syn keyword define define def as var variable parameter +" this section causes problems with procedure folding and folding of the 
-syn keyword type integer character date logical char+" related items 
 +    "syn keyword conditional if then else case when next and or 
 +    "syn keyword repeat do for each while 
 +syn keyword function locked avail substring trim 
 +" this section causes a problem with the temp-table folding 
 +    "syn keyword define contained define def as var variable parameter 
 +    "syn match define /^\s*\(def\|define\).*\(temp-table\)\@!/ contains=ALL 
 +syn keyword type int integer char character date logical temp-table shared stream input frame buffer init
 syn keyword boolean true false syn keyword boolean true false
  
-syn region procedure start=/^\s*procedure .*/ end=/^end.*/ contains=ALLBUT,procedure fold +" we say 'extend' below to make sure that these items don't end the parent 
-syn region comment start=/\/\*/ end=/\*\// contains=ALL+" block; for instance, we don't want a double quoted string containing the 
 +" letters END and a period to actually end a real region 
 +syn region doublestring start=/"/ end=/"/ extend 
 +syn region singlestring start=/'/ end=/'/ extend 
 +syn region form start=/\(\s\|^\)form.*/ end=/\.$\|\.\s/ contains=comment fold 
 +syn region frame start=/\(\s\|^\)\(def\|define\) frame.*/ end=/\.$\|\.\s/ contains=comment fold 
 +syn region temptable start=/\(\s\|^\)\(def\|define\) \(shared \)\=temp-table.*/ end=/\.$\|\.\s/ contains=comment fold 
 +syn region caseregion start=/\(\s\|^\)case[^:.]*:/ end=/\(\s\|^\)end[^.]*\./ contains=ALLBUT,procedure fold keepend extend 
 +syn region doregion start=/\(\s\|^\)do\s*:\|do\s\+\(while\|until\)[^:.]*[:.]/ end=/\(\s\|^\)end[^.]*\./ contains=ALLBUT,procedure fold keepend extend 
 +syn region repeatregion start=/\(\s\|^\)repeat\s*:/ end=/\(\s\|^\)end[^.]*\./ contains=ALLBUT,procedure fold keepend extend 
 +syn region foreachregion start=/\(\s\|^\)for each/ end=/\(\s\|^\)end[^.]*\./ contains=ALLBUT,procedure fold keepend extend 
 +syn region procedure start=/\(\s\|^\)procedure / end=/\(\s\|^\)end[^.]*\./ contains=ALLBUT,procedure fold keepend 
 + 
 +" comments work unless a nested comment ends without a space before ending the 
 +" outer comment: example /* test /* nest */*/ 
 +syn region comment start=/\/\*/ end=/\*\// contains=comment extend 
 + 
 +" use these to help identify syntax bugs...rename the above regions with or 
 +" without a T on the end; then set foldnestmax=20 below 
 +hi caseregionT guifg=black guibg=yellow 
 +hi doregionT guifg=white guibg=blue 
 +hi foreachregionT guifg=white guibg=green 
 +hi procedureT guifg=white guibg=brown 
 + 
 +hi link doublestring String 
 +hi link singlestring String 
 + 
 +setl fen 
 +setl foldnestmax=1 
 +"setl foldnestmax=20 
 +setl foldlevel=0 
 +setl foldmethod=syntax 
 +syn sync fromstart
  
-set fen +" the default progress syntax file is using set expandtab which screws up 
-set foldnestmax=1 +" other new buffers 
-set foldlevel=0 +set noexpandtab 
-set foldmethod=syntax+setl expandtab
 </code> </code>
  • docs/vim/syntax/progress.1232435762.txt.gz
  • Last modified: 2009/01/20 00:16
  • by billh