aboutsummaryrefslogtreecommitdiffstats
path: root/spmd.vim
blob: 99bcb7c27477cdf24d5687ad9da602f4efb45c55 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
" Vim syntax file
" Language:     Screenplay Markdown (provisional)
" Maintainer:	Carson Fire
" Filenames:    *.spmd
" Last Change:	2012 January 14
" Version:		1.1

if exists("b:current_syntax")
  finish
endif

syn case match

syn region spmdSceneheading start="^\(\.\|INT\. \|EXT\. \|INT\./EXT\. \|INT/EXT\. \|INT \|EXT \|INT/EXT \|I/E \|int\. \|ext\. \|int\./ext\. \|int/ext\. \|int \|ext \|int/ext \|i/e \)" end="$" 
syn region spmdDialogue matchgroup=spmdCharacter start="\n^\t*\s*[ A-ZÅÄÖ][.\ A-ZÅÄÖ(]*[.\A-ZÅÄÖ)^]$" end="^$" contains=spmdParenthetical, spmdJoint
syn region spmdComment start="\[\[" end="\]\]"
syn region spmdSynopses start="{{" end="}}"

syn match spmdPagebreak "^===[=]*$"
syn match spmdUnderline "_[^_]*_" 
syn match spmdItalic "\*[^\*]*\*" 
syn match spmdBold "\*\*[^\*]*\*\*" 
syn match spmdBolditalic "\*\*\*[^\*]*\*\*\*" 
syn match spmdParenthetical "^\t*\s*\((.*)\)$" contained
syn match spmdTransition ">\t*\s*[/. A-ZÅÄÖ]*$"
syn match spmdTransition "\t*\s*[/. A-ZÅÄÖ]*:$"
syn match spmdCentered "^\t*\s*>[^$]*<"
syn match spmdDoublespace "  $"
" syn match spmdJoint "||\n[' A-ZÅÄÖ()]*$" contained

hi def spmdUnderline					gui=underline
hi def spmdItalic						gui=italic cterm=italic	
hi def spmdBold							gui=bold cterm=bold	
hi def spmdBolditalic					gui=bold,italic cterm=bold,italic	
hi def link spmdSynopses				special
hi def link spmdComment					comment
hi def link spmdPagebreak				constant
hi def link spmdDoublespace				statusline 
hi def link spmdCharacter               tag 
hi def link spmdDialogue                string
hi def link spmdParenthetical           function
hi def link spmdSceneheading            title
hi def link spmdTransition				conditional
hi def link spmdCentered				statement
" hi def link spmdJoint					spmdCharacter