aboutsummaryrefslogtreecommitdiff
path: root/micro-vim/ftplugin
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-07-18 07:45:58 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-07-18 07:45:58 +0100
commit8bb321f8b032dfaeffbe3d1b8dfeb215c12d3642 (patch)
treec53977d1284347bb1d5963ddb4dc7723c40c6e55 /micro-vim/ftplugin
downloadmicro-lang-8bb321f8b032dfaeffbe3d1b8dfeb215c12d3642.tar.gz
micro-lang-8bb321f8b032dfaeffbe3d1b8dfeb215c12d3642.zip
First public release
Diffstat (limited to 'micro-vim/ftplugin')
-rw-r--r--micro-vim/ftplugin/micro.vim26
1 files changed, 26 insertions, 0 deletions
diff --git a/micro-vim/ftplugin/micro.vim b/micro-vim/ftplugin/micro.vim
new file mode 100644
index 0000000..ea3ce5a
--- /dev/null
+++ b/micro-vim/ftplugin/micro.vim
@@ -0,0 +1,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
+