summaryrefslogtreecommitdiffstats
path: root/syntax/elf.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-09-01 08:33:15 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-09-01 08:33:15 +0200
commite166f741ef054ea990aa6d1af85b97ceb82171bb (patch)
tree275e4f7660eaa181cc3e40f71ce72ba8864e6c71 /syntax/elf.vim
parentd4fcef1aa835f20f4f9df41eceb406b66f446f70 (diff)
downloadvim-polyglot-4.6.0.tar.gz
vim-polyglot-4.6.0.zip
Some major updates including heuristicsv4.6.0
- Allow to define heuristics in heuristics.yaml - Migrate all filetypes from vim beginning with "a" - Remove enhanced cpp syntax (it was too slow to load) - Use setf instead of set ft for setting filetype (faster) - Override native hauristics with au! - Add globbing of files for packages - Replace predefined dirs with extra_dirs and ignored_dirs - Allow to define proper order of packages with topological sort - Fix powershell detection - Lint and fix many packages.yaml issues - etc etd
Diffstat (limited to 'syntax/elf.vim')
-rw-r--r--syntax/elf.vim86
1 files changed, 86 insertions, 0 deletions
diff --git a/syntax/elf.vim b/syntax/elf.vim
new file mode 100644
index 00000000..5b6b9678
--- /dev/null
+++ b/syntax/elf.vim
@@ -0,0 +1,86 @@
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elf') == -1
+
+" Vim syntax file
+" Language: ELF
+" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
+" Last Change: Son 22 Jun 2003 20:43:14 CEST
+" Filenames: *.ab,*.am
+" URL: http://www.cvjb.de/comp/vim/elf.vim
+" $Id: elf.vim,v 1.1 2004/06/13 19:52:27 vimboss Exp $
+"
+" ELF: Extensible Language Facility
+" This is the Applix Inc., Macro and Builder programming language.
+" It has nothing in common with the binary format called ELF.
+
+" quit when a syntax file was already loaded
+if exists("b:current_syntax")
+ finish
+endif
+
+" Case does not matter
+syn case ignore
+
+" Environments
+syn region elfEnvironment transparent matchgroup=Special start="{" matchgroup=Special end="}" contains=ALLBUT,elfBraceError
+
+" Unmatched braces
+syn match elfBraceError "}"
+
+" All macros must have at least one of these definitions
+syn keyword elfSpecial endmacro
+syn region elfSpecial transparent matchgroup=Special start="^\(\(macro\)\|\(set\)\) \S\+$" matchgroup=Special end="^\(\(endmacro\)\|\(endset\)\)$" contains=ALLBUT,elfBraceError
+
+" Preprocessor Commands
+syn keyword elfPPCom define include
+
+" Some keywords
+syn keyword elfKeyword false true null
+syn keyword elfKeyword var format object function endfunction
+
+" Conditionals and loops
+syn keyword elfConditional if else case of endcase for to next while until return goto
+
+" All built-in elf macros end with an '@'
+syn match elfMacro "[0-9_A-Za-z]\+@"
+
+" Strings and characters
+syn region elfString start=+"+ skip=+\\\\\|\\"+ end=+"+
+
+" Numbers
+syn match elfNumber "-\=\<[0-9]*\.\=[0-9_]\>"
+
+" Comments
+syn region elfComment start="/\*" end="\*/"
+syn match elfComment "\'.*$"
+
+syn sync ccomment elfComment
+
+" Parenthesis
+syn match elfParens "[\[\]()]"
+
+" Punctuation
+syn match elfPunct "[,;]"
+
+" Define the default highlighting.
+" Only when an item doesn't have highlighting yet
+
+" The default methods for highlighting. Can be overridden later.
+hi def link elfComment Comment
+hi def link elfPPCom Include
+hi def link elfKeyword Keyword
+hi def link elfSpecial Special
+hi def link elfEnvironment Special
+hi def link elfBraceError Error
+hi def link elfConditional Conditional
+hi def link elfMacro Function
+hi def link elfNumber Number
+hi def link elfString String
+hi def link elfParens Delimiter
+hi def link elfPunct Delimiter
+
+
+let b:current_syntax = "elf"
+
+" vim:ts=8:sw=4:nocindent:smartindent:
+
+endif