forked from b4winckler/macvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
189 additions
and
33 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
" Vim support file to detect file types | ||
" | ||
" Maintainer: Bram Moolenaar <[email protected]> | ||
" Last Change: 2014 Jul 16 | ||
" Last Change: 2014 Jul 23 | ||
|
||
" Listen very carefully, I will say this only once | ||
if exists("did_load_filetypes") | ||
|
@@ -2314,6 +2314,9 @@ au BufNewFile,BufRead vgrindefs setf vgrindefs | |
" VRML V1.0c | ||
au BufNewFile,BufRead *.wrl setf vrml | ||
|
||
" Vroom (vim testing and executable documentation) | ||
au BufNewFile,BufRead *.vroom setf vroom | ||
|
||
" Webmacro | ||
au BufNewFile,BufRead *.wm setf webmacro | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
" Vim filetype plugin file | ||
" Language: Vroom (vim testing and executable documentation) | ||
" Maintainer: David Barnett (https://github.com/google/vim-ft.vroom) | ||
" Last Change: 2014 Jul 23 | ||
|
||
if exists('b:did_ftplugin') | ||
finish | ||
endif | ||
let b:did_ftplugin = 1 | ||
|
||
let s:cpo_save = &cpo | ||
set cpo-=C | ||
|
||
|
||
let b:undo_ftplugin = 'setlocal formatoptions< shiftwidth< softtabstop<' . | ||
\ ' expandtab< iskeyword< comments< commentstring<' | ||
|
||
setlocal formatoptions-=t | ||
|
||
" The vroom interpreter doesn't accept anything but 2-space indent. | ||
setlocal shiftwidth=2 | ||
setlocal softtabstop=2 | ||
setlocal expandtab | ||
|
||
" To allow tag lookup and autocomplete for whole autoload functions, '#' must be | ||
" a keyword character. This also conforms to the behavior of ftplugin/vim.vim. | ||
setlocal iskeyword+=# | ||
|
||
" Vroom files have no comments (text is inert documentation unless indented). | ||
setlocal comments= | ||
setlocal commentstring= | ||
|
||
|
||
let &cpo = s:cpo_save | ||
unlet s:cpo_save |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
" Vim indent file | ||
" Language: Vroom (vim testing and executable documentation) | ||
" Maintainer: David Barnett (https://github.com/google/vim-ft.vroom) | ||
" Last Change: 2014 Jul 23 | ||
|
||
if exists('b:did_indent') | ||
finish | ||
endif | ||
let b:did_indent = 1 | ||
|
||
let s:cpo_save = &cpo | ||
set cpo-=C | ||
|
||
|
||
let b:undo_indent = 'setlocal autoindent<' | ||
|
||
setlocal autoindent | ||
|
||
|
||
let &cpo = s:cpo_save | ||
unlet s:cpo_save |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
" Vim syntax file | ||
" Language: Django template | ||
" Maintainer: Dave Hodder <[email protected]> | ||
" Last Change: 2012 Apr 09 | ||
" Last Change: 2014 Jul 13 | ||
|
||
" For version 5.x: Clear all syntax items | ||
" For version 6.x: Quit when a syntax file was already loaded | ||
|
@@ -64,7 +64,7 @@ syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFil | |
syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display | ||
|
||
" Django template 'comment' tag and comment block | ||
syn region djangoComment start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=djangoTodo | ||
syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo | ||
syn region djangoComBlock start="{#" end="#}" contains=djangoTodo | ||
|
||
" Define the default highlighting. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
" Vim syntax file | ||
" Language: Django HTML template | ||
" Maintainer: Dave Hodder <[email protected]> | ||
" Last Change: 2007 Jan 26 | ||
" Last Change: 2014 Jul 13 | ||
|
||
" For version 5.x: Clear all syntax items | ||
" For version 6.x: Quit when a syntax file was already loaded | ||
|
@@ -28,7 +28,7 @@ syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoC | |
|
||
syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display containedin=ALLBUT,@djangoBlocks | ||
syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks | ||
syn region djangoComment start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks | ||
syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks | ||
syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks | ||
|
||
let b:current_syntax = "htmldjango" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
" Vim syntax file | ||
" Language: Vroom (vim testing and executable documentation) | ||
" Maintainer: David Barnett (https://github.com/google/vim-ft.vroom) | ||
" Last Change: 2014 Jul 23 | ||
|
||
" For version 5.x: Clear all syntax items. | ||
" For version 6.x and later: Quit when a syntax file was already loaded. | ||
if v:version < 600 | ||
syntax clear | ||
elseif exists('b:current_syntax') | ||
finish | ||
endif | ||
|
||
let s:cpo_save = &cpo | ||
set cpo-=C | ||
|
||
|
||
syn include @vroomVim syntax/vim.vim | ||
syn include @vroomShell syntax/sh.vim | ||
|
||
syntax region vroomAction | ||
\ matchgroup=vroomOutput | ||
\ start='\m^ ' end='\m$' keepend | ||
\ contains=vroomControlBlock | ||
|
||
syntax region vroomAction | ||
\ matchgroup=vroomOutput | ||
\ start='\m^ & ' end='\m$' keepend | ||
\ contains=vroomControlBlock | ||
|
||
syntax match vroomOutput '\m^ &$' | ||
|
||
syntax region vroomMessageBody | ||
\ matchgroup=vroomMessage | ||
\ start='\m^ \~ ' end='\m$' keepend | ||
\ contains=vroomControlBlock | ||
|
||
syntax region vroomColoredAction | ||
\ matchgroup=vroomInput | ||
\ start='\m^ > ' end='\m$' keepend | ||
\ contains=vimNotation,vroomControlBlock | ||
syntax region vroomAction | ||
\ matchgroup=vroomInput | ||
\ start='\m^ % ' end='\m$' keepend | ||
\ contains=vimNotation,vroomControlBlock | ||
|
||
syntax region vroomAction | ||
\ matchgroup=vroomContinuation | ||
\ start='\m^ |' end='\m$' keepend | ||
|
||
syntax region vroomAction | ||
\ start='\m^ \ze:' end='\m$' keepend | ||
\ contains=@vroomVim,vroomControlBlock | ||
|
||
syntax region vroomAction | ||
\ matchgroup=vroomDirective | ||
\ start='\m^ @\i\+' end='\m$' keepend | ||
\ contains=vroomControlBlock | ||
|
||
syntax region vroomSystemAction | ||
\ matchgroup=vroomSystem | ||
\ start='\m^ ! ' end='\m$' keepend | ||
\ contains=@vroomShell,vroomControlBlock | ||
|
||
syntax region vroomHijackAction | ||
\ matchgroup=vroomHijack | ||
\ start='\m^ \$ ' end='\m$' keepend | ||
\ contains=vroomControlBlock | ||
|
||
syntax match vroomControlBlock contains=vroomControlEscape,@vroomControls | ||
\ '\v \([^&()][^()]*\)$' | ||
|
||
syntax match vroomControlEscape '\m&' contained | ||
|
||
syntax cluster vroomControls | ||
\ contains=vroomDelay,vroomMode,vroomBuffer,vroomRange | ||
\,vroomChannel,vroomBind,vroomStrictness | ||
syntax match vroomRange '\v\.(,\+?(\d+|\$)?)?' contained | ||
syntax match vroomRange '\v\d*,\+?(\d+|\$)?' contained | ||
syntax match vroomBuffer '\v\d+,@!' contained | ||
syntax match vroomDelay '\v\d+(\.\d+)?s' contained | ||
syntax match vroomMode '\v<%(regex|glob|verbatim)' contained | ||
syntax match vroomChannel '\v<%(stderr|stdout|command|status)>' contained | ||
syntax match vroomBind '\v<bind>' contained | ||
syntax match vroomStrictness '\v\<%(STRICT|RELAXED|GUESS-ERRORS)\>' contained | ||
|
||
highlight default link vroomInput Identifier | ||
highlight default link vroomDirective vroomInput | ||
highlight default link vroomControlBlock vroomInput | ||
highlight default link vroomSystem vroomInput | ||
highlight default link vroomOutput Statement | ||
highlight default link vroomContinuation Constant | ||
highlight default link vroomHijack Special | ||
highlight default link vroomColoredAction Statement | ||
highlight default link vroomSystemAction vroomSystem | ||
highlight default link vroomHijackAction vroomHijack | ||
highlight default link vroomMessage vroomOutput | ||
highlight default link vroomMessageBody Constant | ||
|
||
highlight default link vroomControlEscape Special | ||
highlight default link vroomBuffer vroomInput | ||
highlight default link vroomRange Include | ||
highlight default link vroomMode Constant | ||
highlight default link vroomDelay Type | ||
highlight default link vroomStrictness vroomMode | ||
highlight default link vroomChannel vroomMode | ||
highlight default link vroomBind vroomMode | ||
|
||
let b:current_syntax = 'vroom' | ||
|
||
|
||
let &cpo = s:cpo_save | ||
unlet s:cpo_save |