Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
docs:vim:syntax:progress [2009/01/20 11:17] – billh | docs:vim:syntax:progress [2010/05/12 13:21] (current) – billh | ||
---|---|---|---|
Line 2: | Line 2: | ||
* location: $VIMFILES/ | * location: $VIMFILES/ | ||
< | < | ||
+ | " fix problems with nested comments | ||
+ | try | %s/ | ||
+ | |||
syn clear | syn clear | ||
syn case ignore | syn case ignore | ||
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 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 conditional if then else case when next and or | + | " this section causes problems with procedure folding and folding of the |
- | syn keyword repeat do for each while | + | " related items |
+ | "syn keyword conditional if then else case when next and or | ||
+ | " | ||
syn keyword function locked avail substring trim | syn keyword function locked avail substring trim | ||
" this section causes a problem with the temp-table folding | " this section causes a problem with the temp-table folding | ||
Line 15: | Line 20: | ||
syn keyword boolean true false | syn keyword boolean true false | ||
- | syn region doublestring start=/"/ | + | " we say ' |
- | syn region singlestring start=/'/ | + | " block; for instance, we don't want a double quoted string containing the |
- | syn region form start=/^\s*form.*/ end=/ | + | " letters END and a period to actually end a real region |
- | syn region frame start=/^\s*\(def\|define\) frame.*/ end=/ | + | syn region doublestring start=/"/ |
- | syn region temptable start=/^\s*\(def\|define\) \(shared \)\=temp-table.*/ | + | syn region singlestring start=/'/ |
- | syn region procedure start=/ | + | syn region form start=/\(\s\|^\)form.*/ end=/ |
+ | syn region frame start=/\(\s\|^\)\(def\|define\) frame.*/ end=/ | ||
+ | syn region temptable start=/\(\s\|^\)\(def\|define\) \(shared \)\=temp-table.*/ | ||
+ | syn region | ||
+ | syn region doregion | ||
+ | syn region repeatregion start=/ | ||
+ | syn region foreachregion start=/ | ||
+ | syn region procedure start=/ | ||
" comments work unless a nested comment ends without a space before ending the | " comments work unless a nested comment ends without a space before ending the | ||
" outer comment: example /* test /* nest */*/ | " outer comment: example /* test /* nest */*/ | ||
- | | + | syn region comment start=/ |
- | set fen | + | " use these to help identify syntax bugs...rename the above regions with or |
- | set foldnestmax=1 | + | " without a T on the end; then set foldnestmax=20 below |
- | set foldlevel=0 | + | hi caseregionT guifg=black guibg=yellow |
- | set foldmethod=syntax | + | 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 | syn sync fromstart | ||
+ | |||
+ | " the default progress syntax file is using set expandtab which screws up | ||
+ | " other new buffers | ||
+ | set noexpandtab | ||
+ | setl expandtab | ||
</ | </ |