GIF89a;
EcchiShell v1.0
/
/
proc/
self/
root/
usr/
share/
vim/
Comment')
nmap c LUncomOn
xmap c BUncomOn
nmap C LUncomOff
xmap C BUncomOff
endif
nnoremap LUncomOn gI(* *)
nnoremap LUncomOff :s/^(\* \(.*\) \*)/\1/:noh
xnoremap BUncomOn :'<,'>`0i(*`>o0i*)`<
xnoremap BUncomOff :'<,'>`dd`<
nmap s OCamlSwitchEdit
nmap S OCamlSwitchNewWin
nmap t OCamlPrintType
xmap t OCamlPrintType
endif
" Let % jump between structure elements (due to Issac Trotts)
let b:mw = ''
let b:mw = b:mw . ',\:\:\(\\|;;\)'
let b:mw = b:mw . ',\:\:\'
let b:mw = b:mw . ',\<\(for\|while\)\>:\:\,'
let b:mw = b:mw . ',\<\(object\|sig\|struct\|begin\)\>:\'
let b:mw = b:mw . ',\<\(match\|try\)\>:\'
let b:match_words = b:mw
let b:match_ignorecase=0
" switching between interfaces (.mli) and implementations (.ml)
if !exists("g:did_ocaml_switch")
let g:did_ocaml_switch = 1
nnoremap OCamlSwitchEdit :call OCaml_switch(0)
nnoremap OCamlSwitchNewWin :call OCaml_switch(1)
fun OCaml_switch(newwin)
if (match(bufname(""), "\\.mli$") >= 0)
let fname = s:Fnameescape(substitute(bufname(""), "\\.mli$", ".ml", ""))
if (a:newwin == 1)
exec "new " . fname
else
exec "arge " . fname
endif
elseif (match(bufname(""), "\\.ml$") >= 0)
let fname = s:Fnameescape(bufname("")) . "i"
if (a:newwin == 1)
exec "new " . fname
else
exec "arge " . fname
endif
endif
endfun
endif
" Folding support
" Get the modeline because folding depends on indentation
let s:s = line2byte(line('.'))+col('.')-1
if search('^\s*(\*:o\?caml:')
let s:modeline = getline(".")
else
let s:modeline = ""
endif
if s:s > 0
exe 'goto' s:s
endif
" Get the indentation params
let s:m = matchstr(s:modeline,'default\s*=\s*\d\+')
if s:m != ""
let s:idef = matchstr(s:m,'\d\+')
elseif exists("g:omlet_indent")
let s:idef = g:omlet_indent
else
let s:idef = 2
endif
let s:m = matchstr(s:modeline,'struct\s*=\s*\d\+')
if s:m != ""
let s:i = matchstr(s:m,'\d\+')
elseif exists("g:omlet_indent_struct")
let s:i = g:omlet_indent_struct
else
let s:i = s:idef
endif
" Set the folding method
if exists("g:ocaml_folding")
setlocal foldmethod=expr
setlocal foldexpr=OMLetFoldLevel(v:lnum)
endif
let b:undo_ftplugin = "setlocal efm< foldmethod< foldexpr<"
\ . "| unlet! b:mw b:match_words b:match_ignorecase"
" - Only definitions below, executed once -------------------------------------
if exists("*OMLetFoldLevel")
finish
endif
function s:topindent(lnum)
let l = a:lnum
while l > 0
if getline(l) =~ '\s*\%(\\|\\|\