Created
February 21, 2017 19:23
-
-
Save InternetUnexplorer/02d6e4a1d9950c0dbae3680895b2ca77 to your computer and use it in GitHub Desktop.
Syntax highlighting for brainfuck.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file | |
" Language: Brainfuck | |
" Maintainer: InternetUnexplorer <internetunexplorer@gmail.com> | |
" Last Change: 2017 Feb 17 | |
" Version: 0.1 | |
if !exists("main_syntax") | |
if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif | |
let main_syntax = 'brainfuck' | |
endif | |
" Syntax: Basic Commands | |
syn match brainfuckBasic '[><+-]' | |
" Syntax: I/O Commands | |
syn match brainfuckIO '[\.,]' | |
" Syntax: Loop Commands | |
syn region brainfuckLoop start='\[' end='\]' fold transparent | |
" Syntax: Comments (Non-Commands) | |
syn match brainfuckComment '[^><+\-\[\]\.,]' | |
let b:current_syntax = "brainfuck" | |
hi def link brainfuckBasic Operator | |
hi def link brainfuckIO Function | |
hi def link brainfuckLoop Statement | |
hi def link brainfuckComment Comment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment