* recognize NimScript files * automatically set up tab width in Nim buffers * remove the NimLog in the python module, which is just a debugging aid
27 lines
439 B
VimL
27 lines
439 B
VimL
if exists("b:nim_loaded")
|
|
finish
|
|
endif
|
|
|
|
let b:nim_loaded = 1
|
|
|
|
let s:cpo_save = &cpo
|
|
set cpo&vim
|
|
|
|
call nim#init()
|
|
|
|
setlocal formatoptions-=t formatoptions+=croql
|
|
setlocal comments=:##,:#
|
|
setlocal commentstring=#\ %s
|
|
setlocal omnifunc=NimComplete
|
|
setlocal suffixesadd=.nim
|
|
setlocal expandtab "Make sure that only spaces are used
|
|
|
|
setl tabstop=2
|
|
setl softtabstop=2
|
|
setl shiftwidth=2
|
|
|
|
compiler nim
|
|
|
|
let &cpo = s:cpo_save
|
|
unlet s:cpo_save
|
|
|