aboutsummaryrefslogtreecommitdiff
path: root/micro-vim/ftplugin/micro.vim
blob: ea3ce5a3064627050276c90bde5c94e37840c472 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
if exists("b:did_ftplugin")
	finish
endif
let b:did_ftplugin = 1

let s:save_cpo = &cpo
set cpo-=C

setlocal suffixesadd+=.micro,.cro
setlocal comments=b://,fb:-
setlocal commentstring=//\ %s

setlocal smartindent cindent

setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab

" run make editing a micro file and it will be parsed for errors
setlocal makeprg=micro\ -parse\ %
setlocal errorformat=%f:%l\ col\ %c\ %trror:\ %m

let b:undo_ftplugin="setl com<"

let &cpo = s:save_cpo
unlet s:save_cpo