aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2013-02-10 21:57:18 +0000
committerMike Buland <eichlan@xagasoft.com>2013-02-10 21:57:18 +0000
commit0cce7a054ba818227494f4e48c129dde2cfc0e45 (patch)
treea57c0272babf5967b37b28f612c418463033de29
parent1538ef47d1d4cc08e5f9c5894350bfa225866d40 (diff)
downloadlibgats-0cce7a054ba818227494f4e48c129dde2cfc0e45.tar.gz
libgats-0cce7a054ba818227494f4e48c129dde2cfc0e45.tar.bz2
libgats-0cce7a054ba818227494f4e48c129dde2cfc0e45.tar.xz
libgats-0cce7a054ba818227494f4e48c129dde2cfc0e45.zip
Added vim syntax highlighting for gatstxt format.
Diffstat (limited to '')
-rw-r--r--support/vim/ftdetect/gatstxt.vim1
-rw-r--r--support/vim/ftplugin/gatstxt.vim25
-rw-r--r--support/vim/syntax/gatstxt.vim38
3 files changed, 64 insertions, 0 deletions
diff --git a/support/vim/ftdetect/gatstxt.vim b/support/vim/ftdetect/gatstxt.vim
new file mode 100644
index 0000000..f6f3c1f
--- /dev/null
+++ b/support/vim/ftdetect/gatstxt.vim
@@ -0,0 +1 @@
au BufRead,BufNewFile *.gtxt set filetype=gatstxt
diff --git a/support/vim/ftplugin/gatstxt.vim b/support/vim/ftplugin/gatstxt.vim
new file mode 100644
index 0000000..0a2b911
--- /dev/null
+++ b/support/vim/ftplugin/gatstxt.vim
@@ -0,0 +1,25 @@
1" Vim filetype plugin file
2" Language: GatsTxt
3
4" Only do this when not done yet for this buffer
5if exists("b:did_ftplugin")
6 finish
7endif
8
9" Don't load another plugin for this buffer
10let b:did_ftplugin = 1
11
12" Set format options -- allow comment formatting with gq, but disable
13" other processing
14" setlocal fo-=tcrowan2 fo+=q
15setlocal fo-=t fo+=croql
16
17" Set 'comments' to be the same as C/C++
18setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://,:#
19
20" Win32 can filter files in the browse dialog
21if has("gui_win32") && !exists("b:browsefilter")
22 let b:browsefilter = "Nango files (*.gtxt)\t*.gtxt\n" .
23 \ "All Files (*.*)\t*.*\n"
24endif
25
diff --git a/support/vim/syntax/gatstxt.vim b/support/vim/syntax/gatstxt.vim
new file mode 100644
index 0000000..6722e8a
--- /dev/null
+++ b/support/vim/syntax/gatstxt.vim
@@ -0,0 +1,38 @@
1" Vim syntax file
2" Language: GatsTxt
3" Maintainer: None :)
4" Last Change: 2013 Feb 10
5
6" For version 5.x: Clear all syntax items
7" For version 6.x: Quit when a syntax file was already loaded
8if version < 600
9 syntax clear
10elseif exists("b:current_syntax")
11 finish
12endif
13
14
15sy region Group start=+{+ end=+}+ fold
16sy region List start=+[[]+ end=+]+ fold
17
18sy match Int +[1-9][0-9]*[if]\?+
19sy match Flt +[0-9]*\.[0-9]*[if]\?+
20
21
22sy region Str start=+"+ skip=+\\"+ end=+"+
23sy keyword Bool true
24sy keyword Bool false
25sy keyword Null null
26
27sy match Ops '[{[:}\],]'
28
29" sy region Comment start=+//+ end=+$+
30" sy region Comment start=+/\*+ end=+\*/+
31
32
33hi def link Ops Operator
34hi def link Str String
35hi def link Bool Keyword
36hi def link Null Keyword
37hi def link Int Number
38hi def link Flt Float