1
0
mirror of https://github.com/amix/vimrc synced 2025-06-24 07:44:59 +08:00

Updated vimrc

This commit is contained in:
amix
2015-07-13 11:22:46 +01:00
parent 9a2843c2a5
commit d7752b59ae
301 changed files with 4699 additions and 7969 deletions

View File

@ -10,15 +10,15 @@
"
"============================================================================
if exists("g:loaded_syntastic_ocaml_camlp4o_checker")
if exists('g:loaded_syntastic_ocaml_camlp4o_checker')
finish
endif
let g:loaded_syntastic_ocaml_camlp4o_checker = 1
if exists('g:syntastic_ocaml_camlp4r') && g:syntastic_ocaml_camlp4r != 0
let s:ocamlpp="camlp4r"
let s:ocamlpp='camlp4r'
else
let s:ocamlpp="camlp4o"
let s:ocamlpp='camlp4o'
endif
let s:save_cpo = &cpo
@ -34,7 +34,7 @@ if !exists('g:syntastic_ocaml_use_janestreet_core')
let g:syntastic_ocaml_use_janestreet_core = 0
endif
if !exists('g:syntastic_ocaml_use_ocamlbuild') || !executable("ocamlbuild")
if !exists('g:syntastic_ocaml_use_ocamlbuild') || !executable('ocamlbuild')
let g:syntastic_ocaml_use_ocamlbuild = 0
endif
@ -46,7 +46,7 @@ endfunction " }}}1
function! SyntaxCheckers_ocaml_camlp4o_GetLocList() dict " {{{1
let makeprg = s:GetMakeprg()
if makeprg == ''
if makeprg ==# ''
return []
endif
@ -66,7 +66,7 @@ function! SyntaxCheckers_ocaml_camlp4o_GetLocList() dict " {{{1
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr("")} })
\ 'defaults': {'bufnr': bufnr('')} })
for e in loclist
if get(e, 'col', 0) && get(e, 'nr', 0)
@ -94,18 +94,18 @@ endfunction " }}}2
function! s:GetOcamlcMakeprg() " {{{2
if g:syntastic_ocaml_use_janestreet_core
let build_cmd = "ocamlc -I "
let build_cmd = 'ocamlc -I '
let build_cmd .= expand(g:syntastic_ocaml_janestreet_core_dir, 1)
let build_cmd .= " -c " . syntastic#util#shexpand('%')
let build_cmd .= ' -c ' . syntastic#util#shexpand('%')
return build_cmd
else
return "ocamlc -c " . syntastic#util#shexpand('%')
return 'ocamlc -c ' . syntastic#util#shexpand('%')
endif
endfunction " }}}2
function! s:GetOcamlBuildMakeprg() " {{{2
return "ocamlbuild -quiet -no-log -tag annot," . s:ocamlpp . " -no-links -no-hygiene -no-sanitize " .
\ syntastic#util#shexpand('%:r') . ".cmi"
return 'ocamlbuild -quiet -no-log -tag annot,' . s:ocamlpp . ' -no-links -no-hygiene -no-sanitize ' .
\ syntastic#util#shexpand('%:r') . '.cmi'
endfunction " }}}2
function! s:GetOtherMakeprg() " {{{2
@ -114,15 +114,15 @@ function! s:GetOtherMakeprg() " {{{2
"TODO: should use throw/catch instead of returning an empty makeprg
let extension = expand('%:e', 1)
let makeprg = ""
let makeprg = ''
if stridx(extension, 'mly') >= 0 && executable("menhir")
if stridx(extension, 'mly') >= 0 && executable('menhir')
" ocamlyacc output can't be redirected, so use menhir
let makeprg = "menhir --only-preprocess " . syntastic#util#shexpand('%') . " >" . syntastic#util#DevNull()
elseif stridx(extension,'mll') >= 0 && executable("ocamllex")
let makeprg = "ocamllex -q " . syntastic#c#NullOutput() . " " . syntastic#util#shexpand('%')
let makeprg = 'menhir --only-preprocess ' . syntastic#util#shexpand('%') . ' >' . syntastic#util#DevNull()
elseif stridx(extension,'mll') >= 0 && executable('ocamllex')
let makeprg = 'ocamllex -q ' . syntastic#c#NullOutput() . ' ' . syntastic#util#shexpand('%')
else
let makeprg = "camlp4o " . syntastic#c#NullOutput() . " " . syntastic#util#shexpand('%')
let makeprg = 'camlp4o ' . syntastic#c#NullOutput() . ' ' . syntastic#util#shexpand('%')
endif
return makeprg