mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
commit
5b30ba7b99
@ -1,7 +1,7 @@
|
|||||||
" Vim support file to detect file types
|
" Vim support file to detect file types
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2015 Jan 07
|
" Last Change: 2015 Jan 14
|
||||||
|
|
||||||
" Listen very carefully, I will say this only once
|
" Listen very carefully, I will say this only once
|
||||||
if exists("did_load_filetypes")
|
if exists("did_load_filetypes")
|
||||||
@ -2032,6 +2032,10 @@ func! s:FTRules()
|
|||||||
setf conf " Better than hog
|
setf conf " Better than hog
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
if path =~ '^/\(etc\|usr/share\)/polkit-1/rules\.d'
|
||||||
|
setf javascript
|
||||||
|
return
|
||||||
|
endif
|
||||||
try
|
try
|
||||||
let config_lines = readfile('/etc/udev/udev.conf')
|
let config_lines = readfile('/etc/udev/udev.conf')
|
||||||
catch /^Vim\%((\a\+)\)\=:E484/
|
catch /^Vim\%((\a\+)\)\=:E484/
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
" Language: J
|
" Language: J
|
||||||
" Maintainer: David Bürgin <676c7473@gmail.com>
|
" Maintainer: David Bürgin <676c7473@gmail.com>
|
||||||
" URL: https://github.com/glts/vim-j
|
" URL: https://github.com/glts/vim-j
|
||||||
" Last Change: 2014-04-05
|
" Last Change: 2015-01-11
|
||||||
|
|
||||||
if exists('b:did_ftplugin')
|
if exists('b:did_ftplugin')
|
||||||
finish
|
finish
|
||||||
@ -16,39 +16,41 @@ setlocal iskeyword=48-57,A-Z,_,a-z
|
|||||||
setlocal comments=:NB.
|
setlocal comments=:NB.
|
||||||
setlocal commentstring=NB.\ %s
|
setlocal commentstring=NB.\ %s
|
||||||
setlocal formatoptions-=t
|
setlocal formatoptions-=t
|
||||||
setlocal shiftwidth=2 softtabstop=2 expandtab
|
setlocal shiftwidth=2
|
||||||
|
setlocal softtabstop=2
|
||||||
|
setlocal expandtab
|
||||||
setlocal matchpairs=(:)
|
setlocal matchpairs=(:)
|
||||||
|
|
||||||
let b:undo_ftplugin = 'setlocal matchpairs< expandtab< softtabstop< shiftwidth< formatoptions< commentstring< comments< iskeyword<'
|
let b:undo_ftplugin = 'setlocal matchpairs< expandtab< softtabstop< shiftwidth< formatoptions< commentstring< comments< iskeyword<'
|
||||||
|
|
||||||
" Section movement with ]] ][ [[ []. The start/end patterns below are amended
|
" Section movement with ]] ][ [[ []. The start/end patterns below are amended
|
||||||
" inside the function in order to avoid matching on the current cursor line.
|
" inside the function in order to avoid matching on the current cursor line.
|
||||||
let s:sectionstart = '.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>.*'
|
let s:sectionstart = '\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\)\>.*'
|
||||||
let s:sectionend = '\s*)\s*'
|
let s:sectionend = '\s*)\s*'
|
||||||
|
|
||||||
function! s:SearchSection(end, backwards, visualmode) abort
|
function! s:SearchSection(end, backwards, visualmode) abort
|
||||||
if a:visualmode !=# ''
|
if a:visualmode !=# ''
|
||||||
normal! gv
|
normal! gv
|
||||||
endif
|
endif
|
||||||
let flags = a:backwards ? 'bsW' : 'sW'
|
let l:flags = a:backwards ? 'bsW' : 'sW'
|
||||||
if a:end
|
if a:end
|
||||||
call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags)
|
call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags)
|
||||||
else
|
else
|
||||||
call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags)
|
call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
noremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR>
|
noremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR>
|
||||||
xnoremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR>
|
xnoremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR>
|
||||||
sunmap <buffer> ]]
|
sunmap <buffer> ]]
|
||||||
noremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR>
|
noremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR>
|
||||||
xnoremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR>
|
xnoremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR>
|
||||||
sunmap <buffer> ][
|
sunmap <buffer> ][
|
||||||
noremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR>
|
noremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR>
|
||||||
xnoremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR>
|
xnoremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR>
|
||||||
sunmap <buffer> [[
|
sunmap <buffer> [[
|
||||||
noremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR>
|
noremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR>
|
||||||
xnoremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR>
|
xnoremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR>
|
||||||
sunmap <buffer> []
|
sunmap <buffer> []
|
||||||
|
|
||||||
let b:undo_ftplugin .= ' | silent! execute "unmap <buffer> ]]"'
|
let b:undo_ftplugin .= ' | silent! execute "unmap <buffer> ]]"'
|
||||||
@ -66,7 +68,7 @@ endif
|
|||||||
" Enhanced "%" matching (see ":help matchit")
|
" Enhanced "%" matching (see ":help matchit")
|
||||||
if exists('loaded_matchit') && !exists('b:match_words')
|
if exists('loaded_matchit') && !exists('b:match_words')
|
||||||
let b:match_ignorecase = 0
|
let b:match_ignorecase = 0
|
||||||
let b:match_words = '^.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>:^\s*\:\s*$:^\s*)\s*$'
|
let b:match_words = '^\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>:^\s*\:\s*$:^\s*)\s*$'
|
||||||
\ . ',\<\%(for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.:\<\%(case\|catch[dt]\=\|else\%(if\)\=\|fcase\)\.:\<end\.'
|
\ . ',\<\%(for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.:\<\%(case\|catch[dt]\=\|else\%(if\)\=\|fcase\)\.:\<end\.'
|
||||||
let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words'
|
let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words'
|
||||||
endif
|
endif
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
" Language: J
|
" Language: J
|
||||||
" Maintainer: David Bürgin <676c7473@gmail.com>
|
" Maintainer: David Bürgin <676c7473@gmail.com>
|
||||||
" URL: https://github.com/glts/vim-j
|
" URL: https://github.com/glts/vim-j
|
||||||
" Last Change: 2014-04-05
|
" Last Change: 2015-01-11
|
||||||
|
|
||||||
if exists('b:did_indent')
|
if exists('b:did_indent')
|
||||||
finish
|
finish
|
||||||
@ -26,25 +26,25 @@ if !exists('g:j_indent_definitions')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
function GetJIndent() abort
|
function GetJIndent() abort
|
||||||
let prevlnum = prevnonblank(v:lnum-1)
|
let l:prevlnum = prevnonblank(v:lnum - 1)
|
||||||
if prevlnum == 0
|
if l:prevlnum == 0
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
let indent = indent(prevlnum)
|
let l:indent = indent(l:prevlnum)
|
||||||
let prevline = getline(prevlnum)
|
let l:prevline = getline(l:prevlnum)
|
||||||
if prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$'
|
if l:prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$'
|
||||||
" Increase indentation after an initial control word that starts or
|
" Increase indentation after an initial control word that starts or
|
||||||
" continues a block and is not terminated by "end."
|
" continues a block and is not terminated by "end."
|
||||||
let indent += shiftwidth()
|
let l:indent += shiftwidth()
|
||||||
elseif g:j_indent_definitions && (prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || prevline =~# '^\s*:\s*$')
|
elseif g:j_indent_definitions && (l:prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || l:prevline =~# '^\s*:\s*$')
|
||||||
" Increase indentation in explicit definitions of adverbs, conjunctions,
|
" Increase indentation in explicit definitions of adverbs, conjunctions,
|
||||||
" and verbs
|
" and verbs
|
||||||
let indent += shiftwidth()
|
let l:indent += shiftwidth()
|
||||||
endif
|
endif
|
||||||
" Decrease indentation in lines that start with either control words that
|
" Decrease indentation in lines that start with either control words that
|
||||||
" continue or end a block, or the special items ")" and ":"
|
" continue or end a block, or the special items ")" and ":"
|
||||||
if getline(v:lnum) =~# '^\s*\%()\|:\|\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.\)'
|
if getline(v:lnum) =~# '^\s*\%()\|:\|\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.\)'
|
||||||
let indent -= shiftwidth()
|
let l:indent -= shiftwidth()
|
||||||
endif
|
endif
|
||||||
return indent
|
return l:indent
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: configure.in script: M4 with sh
|
" Language: configure.in script: M4 with sh
|
||||||
" Maintainer: Christian Hammesr <ch@lathspell.westend.com>
|
" Maintainer: Christian Hammesr <ch@lathspell.westend.com>
|
||||||
" Last Change: 2008 Sep 03
|
" Last Change: 2015 Jan 14
|
||||||
|
" (patch from Yngve Inntjore Levinsen to detect AC_MSG)
|
||||||
|
" (patch from Khym Chanur to add @Spell)
|
||||||
|
|
||||||
" Well, I actually even do not know much about m4. This explains why there
|
" Well, I actually even do not know much about m4. This explains why there
|
||||||
" is probably very much missing here, yet !
|
" is probably very much missing here, yet !
|
||||||
" But I missed a good hilighting when editing my GNU autoconf/automake
|
" But I missed good highlighting when editing my GNU autoconf/automake
|
||||||
" script, so I wrote this quick and dirty patch.
|
" script, so I wrote this quick and dirty patch.
|
||||||
|
|
||||||
|
|
||||||
@ -20,14 +22,19 @@ endif
|
|||||||
" define the config syntax
|
" define the config syntax
|
||||||
syn match configdelimiter "[()\[\];,]"
|
syn match configdelimiter "[()\[\];,]"
|
||||||
syn match configoperator "[=|&\*\+\<\>]"
|
syn match configoperator "[=|&\*\+\<\>]"
|
||||||
syn match configcomment "\(dnl.*\)\|\(#.*\)"
|
syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell
|
||||||
syn match configfunction "\<[A-Z_][A-Z0-9_]*\>"
|
syn match configfunction "\<[A-Z_][A-Z0-9_]*\>"
|
||||||
syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>"
|
syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>"
|
||||||
|
syn keyword configDnl dnl contained
|
||||||
syn keyword configkeyword if then else fi test for in do done
|
syn keyword configkeyword if then else fi test for in do done
|
||||||
syn keyword configspecial cat rm eval
|
syn keyword configspecial cat rm eval
|
||||||
syn region configstring start=+"+ skip=+\\"+ end=+"+
|
|
||||||
syn region configstring start=+'+ skip=+\\'+ end=+'+
|
" This shortens the script, see syn-ext-match..
|
||||||
syn region configstring start=+`+ skip=+\\'+ end=+`+
|
syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell
|
||||||
|
|
||||||
|
" Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string.
|
||||||
|
syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell
|
||||||
|
syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell
|
||||||
|
|
||||||
" Define the default highlighting.
|
" Define the default highlighting.
|
||||||
" For version 5.7 and earlier: only when not done already
|
" For version 5.7 and earlier: only when not done already
|
||||||
@ -43,6 +50,7 @@ if version >= 508 || !exists("did_config_syntax_inits")
|
|||||||
HiLink configdelimiter Delimiter
|
HiLink configdelimiter Delimiter
|
||||||
HiLink configoperator Operator
|
HiLink configoperator Operator
|
||||||
HiLink configcomment Comment
|
HiLink configcomment Comment
|
||||||
|
HiLink configDnl Comment
|
||||||
HiLink configfunction Function
|
HiLink configfunction Function
|
||||||
HiLink confignumber Number
|
HiLink confignumber Number
|
||||||
HiLink configkeyword Keyword
|
HiLink configkeyword Keyword
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
" Language: J
|
" Language: J
|
||||||
" Maintainer: David Bürgin <676c7473@gmail.com>
|
" Maintainer: David Bürgin <676c7473@gmail.com>
|
||||||
" URL: https://github.com/glts/vim-j
|
" URL: https://github.com/glts/vim-j
|
||||||
" Last Change: 2014-10-05
|
" Last Change: 2015-01-11
|
||||||
|
|
||||||
if exists('b:current_syntax')
|
if exists('b:current_syntax')
|
||||||
finish
|
finish
|
||||||
@ -23,12 +23,12 @@ syntax match jControl /\<\%(for\|goto\|label\)_\a\k*\./
|
|||||||
" Standard library names. A few names need to be defined with ":syntax match"
|
" Standard library names. A few names need to be defined with ":syntax match"
|
||||||
" because they would otherwise take precedence over the corresponding jControl
|
" because they would otherwise take precedence over the corresponding jControl
|
||||||
" and jDefineExpression items.
|
" and jDefineExpression items.
|
||||||
syntax keyword jStdlibNoun ARGV BINPATH CR CRLF DEL Debug EAV EMPTY FF FHS IF64 IFIOS IFJCDROID IFJHS IFQT IFRASPI IFUNIX IFWIN IFWINCE IFWINE IFWOW64 JB01 JBOXED JCHAR JCMPX JFL JINT JPTR JSIZES JSTR JTYPES JVERSION LF LF2 TAB UNAME UNXLIB andurl dbhelp libjqt
|
syntax keyword jStdlibNoun ARGV BINPATH CR CRLF DEL Debug EAV EMPTY FF FHS IF64 IFIOS IFJCDROID IFJHS IFQT IFRASPI IFUNIX IFWIN IFWINCE IFWINE IFWOW64 JB01 JBOXED JCHAR JCMPX JFL JINT JPTR JSIZES JSTR JTYPES JVERSION LF LF2 TAB UNAME UNXLIB dbhelp libjqt
|
||||||
syntax keyword jStdlibAdverb define each every fapplylines inv inverse items leaf rows table
|
syntax keyword jStdlibAdverb define each every fapplylines inv inverse items leaf rows rxapply rxmerge table
|
||||||
syntax keyword jStdlibConjunction bind cuts def on
|
syntax keyword jStdlibConjunction bind cuts def on
|
||||||
syntax keyword jStdlibVerb AND Endian IFDEF Note OR XOR alpha17 alpha27 anddf android_exec_host andunzip apply boxopen boxxopen bx calendar cd cdcb cder cderx cdf charsub chopstring clear coclass cocreate cocurrent codestroy coerase cofind cofindv cofullname coinfo coinsert coname conames conew conl conouns conounsx copath copathnl copathnlx coreset costate cut cutLF cutopen cutpara datatype dbctx dberm dberr dbg dbjmp dblocals dblxq dblxs dbnxt dbq dbr dbret dbrr dbrrx dbrun dbs dbsig dbsq dbss dbst dbstack dbstk dbstop dbstopme dbstopnext dbstops dbtrace dbview deb debc delstring detab dfh dir dircompare dircompares dirfind dirpath dirss dirssrplc dirtree dirused dlb dltb dltbs dquote drop dropafter dropto dtb dtbs echo empty endian erase evtloop exit expand f2utf8 fappend fappends fboxname fc fcopynew fdir ferase fetch fexist fexists fgets file2url fixdotdot fliprgb fmakex foldpara foldtext fpathcreate fpathname fputs fread freadblock freadr freads frename freplace fsize fss fssrplc fstamp fstringreplace ftype fview fwrite fwritenew fwrites getargs getdate getenv getqtbin hfd hostpathsep ic install iospath isatty isotimestamp isutf8 jcwdpath joinstring jpathsep jsystemdefs list ljust load loadd mema memf memr memw nameclass namelist names nc nl pick quote require rjust rplc script scriptd setbreak show sign sminfo smoutput sort split splitnostring splitstring ss startupandroid startupconsole startupide stderr stdin stdout stringreplace symdat symget symset take takeafter taketo timespacex timestamp timex tmoutput toCRLF toHOST toJ todate todayno tolower topara toupper tsdiff tsrep tstamp type ucp ucpcount unxlib usleep utf8 uucp valdate wcsize weekday weeknumber weeksinyear winpathsep
|
syntax keyword jStdlibVerb AND Endian IFDEF OR XOR anddf android_exec_am android_exec_host andunzip apply boxopen boxxopen bx calendar cd cdcb cder cderx cdf charsub chopstring cleartags clear coclass cocreate cocurrent codestroy coerase cofind cofindv cofullname coinfo coinsert compare coname conames conew conl conouns conounsx copath copathnl copathnlx coreset costate cut cutLF cutopen cutpara datatype dbctx dberm dberr dbg dbjmp dblocals dblxq dblxs dbnxt dbq dbr dbret dbrr dbrrx dbrun dbs dbsig dbsq dbss dbst dbstack dbstk dbstop dbstopme dbstopnext dbstops dbtrace dbview deb debc delstring detab dfh dir dircompare dircompares dirfind dirpath dirss dirssrplc dirtree dirused dlb dltb dltbs dquote drop dropafter dropto dtb dtbs echo empty endian erase evtloop exit expand f2utf8 fappend fappends fboxname fc fcompare fcompares fcopynew fdir ferase fetch fexist fexists fgets file2url fixdotdot fliprgb fmakex foldpara foldtext fpathcreate fpathname fputs fread freadblock freadr freads frename freplace fsize fss fssrplc fstamp fstringreplace ftype fview fwrite fwritenew fwrites getalpha getargs getdate getenv getqtbin hfd hostpathsep ic install iospath isatty isotimestamp isutf8 jcwdpath joinstring jpath jpathsep jsystemdefs launch list ljust load loadd loadtags mema memf memr memw nameclass namelist names nc nl pick quote require rjust rplc rxE rxall rxcomp rxcut rxeq rxerror rxfirst rxfree rxfrom rxhandles rxin rxindex rxinfo rxmatch rxmatches rxrplc rxutf8 script scriptd scripts setalpha setbreak shell show sign sminfo smoutput sort split splitnostring splitstring ss startupandroid startupconsole startupide stderr stdin stdout stringreplace symdat symget symset ta tagcp tagopen tagselect take takeafter taketo timespacex timestamp timex tmoutput toCRLF toHOST toJ todate todayno tolower topara toupper tsdiff tsrep tstamp type ucp ucpcount unxlib usleep utf8 uucp valdate wcsize weekday weeknumber weeksinyear winpathsep xedit
|
||||||
syntax match jStdlibNoun /\<\%(adverb\|conjunction\|dyad\|monad\|noun\|verb\)\>/
|
syntax match jStdlibNoun /\<\%(adverb\|conjunction\|dyad\|monad\|noun\|verb\)\>/
|
||||||
syntax match jStdlibVerb /\<\%(assert\|break\|do\)\>\.\@!/
|
syntax match jStdlibVerb /\<\%(Note\|\%(assert\|break\|do\)\.\@!\)\>/
|
||||||
|
|
||||||
" Numbers. Matching J numbers is difficult. In fact, the job cannot be done
|
" Numbers. Matching J numbers is difficult. In fact, the job cannot be done
|
||||||
" with regular expressions alone. Below is a sketch of the pattern used. It
|
" with regular expressions alone. Below is a sketch of the pattern used. It
|
||||||
@ -75,12 +75,12 @@ syntax match jConjunction /;\.\|\^:\|![.:]/
|
|||||||
" the next line. The trick is to split the problem into two regions and link
|
" the next line. The trick is to split the problem into two regions and link
|
||||||
" them with "nextgroup=". The fold wrapper provides syntax folding.
|
" them with "nextgroup=". The fold wrapper provides syntax folding.
|
||||||
syntax region jNounDefineFold
|
syntax region jNounDefineFold
|
||||||
\ matchgroup=NONE start=/\<\%(\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>\)\@=/
|
\ matchgroup=NONE start=/\%(\%(\%(^\s*Note\)\|\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>\)\@=/
|
||||||
\ keepend matchgroup=NONE end=/^\s*)\s*$/
|
\ keepend matchgroup=NONE end=/^\s*)\s*$/
|
||||||
\ contains=jNounDefineStart
|
\ contains=jNounDefineStart
|
||||||
\ fold
|
\ fold
|
||||||
syntax region jNounDefineStart
|
syntax region jNounDefineStart
|
||||||
\ matchgroup=jDefineExpression start=/\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>/
|
\ matchgroup=jDefineExpression start=/\%(\%(^\s*Note\)\|\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>/
|
||||||
\ keepend matchgroup=NONE end=/$/
|
\ keepend matchgroup=NONE end=/$/
|
||||||
\ contains=@jStdlibItems,@jPrimitiveItems,jNumber,jString,jParenGroup,jParen,jComment
|
\ contains=@jStdlibItems,@jPrimitiveItems,jNumber,jString,jParenGroup,jParen,jComment
|
||||||
\ contained oneline skipempty nextgroup=jDefineEnd,jNounDefine
|
\ contained oneline skipempty nextgroup=jDefineEnd,jNounDefine
|
||||||
@ -112,7 +112,7 @@ syntax region jParenGroup
|
|||||||
\ oneline transparent
|
\ oneline transparent
|
||||||
|
|
||||||
syntax keyword jTodo contained TODO FIXME XXX
|
syntax keyword jTodo contained TODO FIXME XXX
|
||||||
syntax match jComment /NB\..*$/ contains=jTodo,@Spell
|
syntax match jComment /\<NB\..*$/ contains=jTodo,@Spell
|
||||||
|
|
||||||
syntax match jSharpBang /\%^#!.*$/
|
syntax match jSharpBang /\%^#!.*$/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user