commit 01e6f66d2f8a9d14fe5cb4c8a940f91440a12741
parent 0110d15dee7ec5b09ebfa58b68cc623972bca20d
Author: erai <erai@omiltem.net>
Date: Mon, 18 Nov 2024 00:13:02 -0500
Add vimfiles
Diffstat:
4 files changed, 88 insertions(+), 0 deletions(-)
diff --git a/vimfiles/ftdetect/omiltem.vim b/vimfiles/ftdetect/omiltem.vim
@@ -0,0 +1 @@
+au! BufRead,BufNewFile *.om setf omiltem
diff --git a/vimfiles/ftplugin/omiltem.vim b/vimfiles/ftplugin/omiltem.vim
@@ -0,0 +1,8 @@
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+if !exists("g:omiltem_recommended_style") || g:omiltem_recommended_style != 0
+ set noexpandtab tabstop=8 softtabstop=8 shiftwidth=8
+endif
diff --git a/vimfiles/intent/omiltem.vim b/vimfiles/intent/omiltem.vim
@@ -0,0 +1,8 @@
+if exists("b:did_indent")
+ finish
+endif
+let b:did_indent = 1
+
+setlocal cindent
+
+let b:undo_indent = "setlocal cindent<"
diff --git a/vimfiles/syntax/omiltem.vim b/vimfiles/syntax/omiltem.vim
@@ -0,0 +1,71 @@
+if exists("b:current_syntax")
+ finish
+endif
+
+" return break sizeof if else loop continue goto var enum struct union byte
+" int void func
+
+syn keyword oReturn return
+syn keyword oBreak break
+syn keyword oSizeof sizeof
+syn keyword oIf if
+syn keyword oElse else
+syn keyword oLoop loop
+syn keyword oContinue continue
+syn keyword oGoto goto
+syn keyword oVar var
+syn keyword oEnum enum
+syn keyword oStruct struct
+syn keyword oUnion union
+syn keyword oByte byte
+syn keyword oInt int
+syn keyword oVoid void
+syn keyword oFunc func
+
+syn keyword oTodo contained TODO FIXME XXX BUG
+syn cluster oCommentGroup contains=oTodo
+syn region oComment start="//" end="$" contains=@oCommentGroup,@Spell
+
+syn region oString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
+
+syn region oChar start=+'+ skip=+\\\\\|\\'+ end=+'+
+
+syn match oDecInt "\<-\=\%(0\|\d\+\)\>"
+syn match oHexInt "\<-\=0[xX]\%(\x\+\)\>"
+
+syn region oBlock start="{" end="}" transparent
+
+hi def link oDecInt Integer
+hi def link oHexInt Integer
+hi def link Integer Number
+
+hi def link oChar Character
+
+hi def link oString String
+
+hi def link oComment Comment
+hi def link oTodo Todo
+
+hi def link oReturn Keyword
+hi def link oBreak Keyword
+hi def link oSizeof Keyword
+
+hi def link oIf Conditional
+hi def link oElse Conditional
+
+hi def link oLoop Repeat
+hi def link oContinue Statement
+hi def link oGoto Statement
+
+hi def link oVar Keyword
+
+hi def link oEnum Structure
+hi def link oStruct Structure
+hi def link oUnion Structure
+
+hi def link oByte Type
+hi def link oInt Type
+hi def link oVoid Type
+hi def link oFunc Type
+
+let b:current_syntax = "omiltem"