晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 sh-3ll

HOME


sh-3ll 1.0
DIR:/proc/thread-self/root/proc/thread-self/root/usr/share/vim/vim80/ftplugin/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/usr/share/vim/vim80/ftplugin/zimbu.vim
" Vim filetype plugin file
" Language:	Zimbu
" Maintainer:	Bram Moolenaar <Bram@vim.org>
" Last Change:	2017 Dec 05

" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
  finish
endif

" Don't load another plugin for this buffer
let b:did_ftplugin = 1

" Using line continuation here.
let s:cpo_save = &cpo
set cpo-=C

let b:undo_ftplugin = "setl fo< com< ofu< efm< tw< et< sts< sw< | if has('vms') | setl isk< | endif"

" Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croql

" Set completion with CTRL-X CTRL-O to autoloaded function.
if exists('&ofu')
  setlocal ofu=ccomplete#Complete
endif

" Set 'comments' to format dashed lists in comments.
" And to keep Zudocu comment characters.
setlocal comments=sO:#\ -,mO:#\ \ ,:#=,:#-,:#%,:#

setlocal errorformat^=%f\ line\ %l\ col\ %c:\ %m,ERROR:\ %m

" When the matchit plugin is loaded, this makes the % command skip parens and
" braces in comments.
let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=\(}\|\<UNTIL\>\)'

let b:match_skip = 's:comment\|string\|zimbuchar'

setlocal tw=78
setlocal et sts=2 sw=2

" Does replace when a dot, space or closing brace is typed.
func! GCUpperDot(what)
  if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != '.' && v:char != ')' && v:char != '}' && v:char != ','
    " no space or dot after the typed text
    let g:got_char = v:char
    return a:what
  endif
  return GCUpperCommon(a:what)
endfunc

" Does not replace when a dot is typed.
func! GCUpper(what)
  if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != ')' && v:char != ','
    " no space or other "terminating" character after the typed text
    let g:got_char = v:char
    return a:what
  endif
  return GCUpperCommon(a:what)
endfunc

" Only replaces when a space is typed.
func! GCUpperSpace(what)
  if v:char != ' '
    " no space after the typed text
    let g:got_char = v:char
    return a:what
  endif
  return GCUpperCommon(a:what)
endfunc

func! GCUpperCommon(what)
  let col = col(".") - strlen(a:what)
  if col > 1 && getline('.')[col - 2] != ' '
    " no space before the typed text
    let g:got_char = 999
    return a:what
  endif
  let synName = synIDattr(synID(line("."), col(".") - 2, 1), "name")
  if synName =~ 'Comment\|String\|zimbuCregion\|\<c'
    " inside a comment or C code
    let g:got_char = 777
    return a:what
  endif
    let g:got_char = 1111
  return toupper(a:what)
endfunc

iabbr <buffer> <expr> alias GCUpperSpace("alias")
iabbr <buffer> <expr> arg GCUpperDot("arg")
iabbr <buffer> <expr> break GCUpper("break")
iabbr <buffer> <expr> case GCUpperSpace("case")
iabbr <buffer> <expr> catch GCUpperSpace("catch")
iabbr <buffer> <expr> check GCUpperDot("check")
iabbr <buffer> <expr> class GCUpperSpace("class")
iabbr <buffer> <expr> interface GCUpperSpace("interface")
iabbr <buffer> <expr> implements GCUpperSpace("implements")
iabbr <buffer> <expr> shared GCUpperSpace("shared")
iabbr <buffer> <expr> continue GCUpper("continue")
iabbr <buffer> <expr> default GCUpper("default")
iabbr <buffer> <expr> extends GCUpper("extends")
iabbr <buffer> <expr> do GCUpper("do")
iabbr <buffer> <expr> else GCUpper("else")
iabbr <buffer> <expr> elseif GCUpperSpace("elseif")
iabbr <buffer> <expr> enum GCUpperSpace("enum")
iabbr <buffer> <expr> exit GCUpper("exit")
iabbr <buffer> <expr> false GCUpper("false")
iabbr <buffer> <expr> fail GCUpper("fail")
iabbr <buffer> <expr> finally GCUpper("finally")
iabbr <buffer> <expr> for GCUpperSpace("for")
iabbr <buffer> <expr> func GCUpperSpace("func")
iabbr <buffer> <expr> if GCUpperSpace("if")
iabbr <buffer> <expr> import GCUpperSpace("import")
iabbr <buffer> <expr> in GCUpperSpace("in")
iabbr <buffer> <expr> io GCUpperDot("io")
iabbr <buffer> <expr> main GCUpper("main")
iabbr <buffer> <expr> module GCUpperSpace("module")
iabbr <buffer> <expr> new GCUpper("new")
iabbr <buffer> <expr> nil GCUpper("nil")
iabbr <buffer> <expr> ok GCUpper("ok")
iabbr <buffer> <expr> proc GCUpperSpace("proc")
iabbr <buffer> <expr> proceed GCUpper("proceed")
iabbr <buffer> <expr> return GCUpper("return")
iabbr <buffer> <expr> step GCUpperSpace("step")
iabbr <buffer> <expr> switch GCUpperSpace("switch")
iabbr <buffer> <expr> sys GCUpperDot("sys")
iabbr <buffer> <expr> this GCUpperDot("this")
iabbr <buffer> <expr> throw GCUpperSpace("throw")
iabbr <buffer> <expr> try GCUpper("try")
iabbr <buffer> <expr> to GCUpperSpace("to")
iabbr <buffer> <expr> true GCUpper("true")
iabbr <buffer> <expr> until GCUpperSpace("until")
iabbr <buffer> <expr> while GCUpperSpace("while")
iabbr <buffer> <expr> repeat GCUpper("repeat")

if !exists("no_plugin_maps") && !exists("no_zimbu_maps")
  nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR>
  nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR>
endif

" Using a function makes sure the search pattern is restored
func! ZimbuGoStartBlock()
  ?^\s*\(FUNC\|PROC\|MAIN\|ENUM\|CLASS\|INTERFACE\)\>
endfunc
func! ZimbuGoEndBlock()
  /^\s*\(FUNC\|PROC\|MAIN\|ENUM\|CLASS\|INTERFACE\)\>
endfunc


let &cpo = s:cpo_save
unlet s:cpo_save