From 8c48dff2d72d7a8b5048adc4832bae32ad5eec2e Mon Sep 17 00:00:00 2001 From: Adam Strzelecki Date: Mon, 7 Dec 2015 18:26:04 +0100 Subject: [PATCH] TextMate 2 project properties file 1. Defining code style 2. Describing which files should not be searched (binaries) 3. Automatically sets the spelling language for translations --- .tm_properties | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .tm_properties diff --git a/.tm_properties b/.tm_properties new file mode 100644 index 000000000..9418e198d --- /dev/null +++ b/.tm_properties @@ -0,0 +1,41 @@ +# TextMate 2 project file +# +# Copyright 2015 The Gogs Authors. All rights reserved. +# Use of this source code is governed by a MIT-style +# license that can be found in the LICENSE file. + +# build with sqlite +TM_MAKE_FLAGS = 'TAGS=sqlite' + +# exclude binary data from search +binary = '{gogs,*.{jpg,png,eot,ttf,woff,woff2,otf}}' +excludeInFolderSearch = '{data,gogs-repositories*,modules/bindata,.git,*.min.css}' +includeFiles = '{.bra.toml,.dockerignore,.gitignore,.gopmfile,.pkgr.yml,.travis.yml}' + +# set language for translations based on file name suffix +[ locale_*.ini ] +FILE_LANGUAGE = '${TM_FILEPATH/^.*locale_([a-z]+)-([A-Z]+).*$/$1_$2/}' +windowTitle = '$TM_FILEPATH — $FILE_LANGUAGE Translation' +spellingLanguage = '$FILE_LANGUAGE' + +# tmpl files are html +[ *.tmpl ] +fileType = text.html + +# ini files are ini +[ *.ini ] +fileType = source.ini + +# use (hard) tabs in all files +[ source.go; text.html ] +softTabs = false +tabSize = 2 +wrapColumn = 0 +softWrap = true +showWrapColumn = false + +[ README.md ] +spellingLanguage = 'en_US' + +[ README_ZH.md ] +spellingLanguage = 'zh_CN'