# should go to SciTEDirectory.properties
#project.base.dir=
#project.path.build=
#project.include.dir=$(project.base.dir)/include
#project.source.dir=$(project.base.dir)/src
#command.build.$(file.patterns.cpp)=

# custom scripts support
if PLAT_WIN
	innosetup.home=$(ProgramFiles)\Inno Setup 5
	innosetup="$(innosetup.home)\iscc.exe"

markdown.rendering.command=1121
markdown.rendering.dir=$(SciteUserHome)/.md
markdown.rendering.file=$(markdown.rendering.dir)/$(FileName).html

if PLAT_WIN
	python.home=C:\Python27
	python=$(python.home)\pythonw.exe
	markdown.script=$(python.home)\Scripts\markdown_py.bat
if PLAT_UNIX
	python=/usr/bin/python
	markdown.script=/usr/local/bin/markdown_py
	# open the web browser in background
	command.build.subsystem.$(file.patterns.web)=2
	command.go.$(file.patterns.web)=xdg-open "file://$(FilePath)"

properties.directory.enable=1

# window position
position.left=400
position.top=0
position.width=880
position.height=770

# put output pane below the editing pane
split.vertical=0

# let output pane scroll and remain at the bottom after execution
output.scroll=2

# clear output pane before a tool is executed
clear.before.execute=1

# show toolbar and statusbar at startup
toolbar.visible=1
toolbar.large=1
statusbar.visible=1

# do not use find/replace strips
find.use.strip=0
replace.use.strip=0

# show line numbers
line.margin.visible=1
line.margin.width=3+
margin.width=
fold.margin.width=0

# draw an edge at column 80
edge.column=80
edge.mode=1

# load some lua extensions
ext.lua.startup.script=$(SciteUserHome)/.scite/lua/SciTEStartup.lua
extension.$(file.patterns.cpp)=$(SciteUserHome)/.scite/lua/snippets-cpp.lua
extension.$(file.patterns.html)=$(SciteUserHome)/.scite/lua/snippets-html.lua
extension.$(file.patterns.markdown)=$(SciteUserHome)/.scite/lua/markdown.lua

# buffer behaviour
load.on.activate=1
are.you.sure.on.reload=1
reload.preserves.undo=1
check.if.already.open=1
title.full.path=1
title.show.buffers=1

buffers=100

# api specs
api.*.c=$(SciteUserHome)/.scite/api/c.api
api.*.cpp=$(SciteUserHome)/.scite/api/cpp.api
api.CMakeLists.txt=$(SciteUserHome)/.scite/api/cmake.api

# tabs
tabsize=4
indent.size=4
use.tabs.$(file.patterns.lua)=0
use.tabs.$(file.patterns.md)=0
use.tabs.$(file.patterns.py)=0
use.tabs.$(file.patterns.cpp)=0
use.tabs.$(file.patterns.cmake)=0
tab.indents=1
backspace.unindents=1
indent.automatic=1
indent.opening=0
indent.closing=0
strip.trailing.spaces=1
strip.trailing.spaces.$(file.patterns.make)=0

# enable word wrapping, and show a marker at the border
wrap.style=1
wrap.visual.flags=1
wrap.visual.flags.location=1

# home/end keys move the cursor to the begin/end of the current row
wrap.aware.home.end.keys=1

# use a flattened tree control with square headers
fold.highlight=0
fold.margin.width=0
fold.symbols=0

# find in files
if PLAT_WIN
	find.command=findstr /n /s /r /c:"$(find.what)" "$(find.directory)\$(find.files)"
if PLAT_UNIX
	find.command=grep --line-number --recursive --include="$(find.files)" "$(find.what)" "$(find.directory)"

find.files=*.*|*.cpp|*.h|*.xml

# enable search/replace by style
find.replace.advanced=1

# in-window find/replace strips instead of dialogs
find.use.strip=0
replace.use.strip=0

# enable end-of-line autodetection
eol.auto=1

# enable word autocompletion
autocompleteword.automatic=1

# close xml tags automatically
xml.auto.close.tags=1

# quoting for text files
comment.block.=>

# fonts
font.base=$(font.monospace)
font.small=$(font.monospace)
font.comment=$(font.monospace)
font.code.comment.box=$(font.comment)
font.code.comment.line=$(font.comment)
font.code.comment.doc=$(font.comment)
font.code.comment.nested=$(font.comment)
font.text=$(font.monospace)
font.text.comment=$(font.monospace)
font.embedded.base=$(font.monospace)
font.embedded.comment=$(font.monospace)
if PLAT_WIN
	font.monospace=font:Consolas,size:12
if PLAT_UNIX
	font.monospace=font:Ubuntu Mono,size:14
font.vbs=$(font.monospace)

# render text through the Direct2D API
technology=0

# Alt+Up/Down move selection up and down
user.shortcuts=Alt+Up|2620|Alt+Down|2621|

# current word hilighting
highlight.current.word=0
highlight.current.word.by.style=0
indicators.under=1
indicators.alpha=128

error.inline=0

menu.language=\
Text|txt|$(keyText)|\
&Batch|bat||\
&C / C++|c||\
CMake|cmake||\
C&#|cs||\
CSS|css||\
&Difference|diff||\
H&ypertext|html|$(keyHTML)|\
&InnoSetup|iss||\
&Java|java||\
Java&Script|js||\
Lu&a|lua||\
&Makefile|mak|$(keyMake)|\
Markdown|md||\
&Properties|properties||\
Pytho&n|py||\
Reso&urce|rc||\
S&QL|sql||\
&VB|vb||\
VBScr&ipt|vbs||\
&XML|xml|$(keyXML)|

# load custom colors
# currently available themes: solarized, twilight, zenburn
import SciTE.theme.solarized

if USE_CUSTOM_COLOURS
	style.*.32=$(font.base),$(style.normal)
	style.*.33=$(font.base),$(style.linenr)
	style.*.34=$(style.matchparen)
	style.*.35=$(style.unmatchparen)
	style.*.36=
	style.*.37=$(style.folded)
	style.*.38=$(style.calltips)

#
# file specific settings
#

# cpp
filter.cpp=C/C++ (c cc cpp cxx cs h hh hxx hpp ipp dlg rc rc2 mak)|\
$(file.patterns.cpp);$(file.patterns.cs);$(file.patterns.rc);\
$(file.patterns.def);*.mak;make*|
lexer.$(file.patterns.def)=cpp
lexer.cpp.track.preprocessor=0
openpath.$(file.patterns.cpp)=$(project.include.dir);
keywordclass.cpp=alignas \
alignof \
and \
and_eq \
asm \
auto \
bitand \
bitor \
bool \
break \
case \
catch \
char \
char16_t \
char32_t \
class \
compl \
const \
constexpr \
const_cast \
continue \
decltype \
default \
delete \
do \
double \
dynamic_cast \
else \
enum \
explicit \
export \
extern \
false \
final \
float \
for \
friend \
goto \
if \
inline \
int \
long \
mutable \
namespace \
new \
noexcept \
not \
not_eq \
nullptr \
operator \
or \
or_eq \
override \
private \
protected \
public \
register \
reinterpret_cast \
return \
short \
signed \
sizeof \
static \
static_assert \
static_cast \
struct \
switch \
template \
this \
thread_local \
throw \
true \
try \
typedef \
typeid \
typename \
union \
unsigned \
using \
virtual \
void \
volatile \
wchar_t \
while \
xor \
xor_eq
keywordclass2.cpp=abort \
abs \
acos \
asctime \
asin \
assert \
atan \
atan2 \
atexit \
atof \
atoi \
atol \
bsearch \
calloc \
ceil \
clearerr \
clock \
cos \
cosh \
ctime \
difftime \
div \
exit \
exp \
fabs \
fclose \
feof \
ferror \
fflush \
fgetc \
fgetpos \
fgets \
floor \
fmod \
fopen \
fprintf \
fputc \
fputs \
fread \
free \
freopen \
frexp \
fscanf \
fseek \
fsetpos \
ftell \
fwrite \
getc \
getchar \
getenv \
gets \
gmtime \
isalnum \
isalpha \
iscntrl \
isdigit \
isgraph \
islower \
isprint \
ispunct \
isspace \
isupper \
isxdigit \
labs \
ldexp \
ldiv \
localtime \
log \
log10 \
longjmp \
malloc \
memchr \
memcmp \
memcpy \
memmove \
memset \
mktime \
modf \
perror \
pow \
printf \
putc \
putchar \
putenv \
puts \
qsort \
raise \
rand \
realloc \
remove \
rename \
rewind \
scanf \
setbuf \
setjmp \
setlocale \
setvbuf \
signal \
sin \
sinh \
sprintf \
sqrt \
srand \
sscanf \
strcat \
strchr \
strcmp \
strcoll \
strcpy \
strcspn \
strerror \
strftime \
strlen \
strncat \
strncmp \
strncpy \
strpbrk \
strrchr \
strspn \
strstr \
strtod \
strtok \
strtol \
strtoul \
strxfrm \
system \
tan \
tanh \
time \
tmpfile \
tmpnam \
tolower \
toupper \
ungetc \
va_arg \
va_end \
va_start \
vfprintf \
vprintf \
vsprintf \
vfscanf \
vscanf \
vsscanf
keywords2.$(file.patterns.cpp)=$(keywordclass2.cpp)
keywords6.$(file.patterns.c.like)=TODO FIXME XXX
command.compile.$(file.patterns.cpp)=
command.build.$(file.patterns.cpp)=

# cmake
filter.cmake=CMake (CMakeLists.txt, *.cmake, *.ctest)|CMakeLists.txt;*.cmake;*.cmake.in;*.ctest;*.ctest.in|
file.patterns.cmake=CMakeLists.txt;*.cmake;*.cmake.in;*.ctest;*.ctest.in
lexer.$(file.patterns.cmake)=cmake
statement.indent.$(file.patterns.cmake)=5 if while foreach macro
comment.block.cmake=#~
comment.block.at.line.start.cmake=1
calltip.cmake.ignorecase=1
calltip.cmake.parameters.start=(
calltip.cmake.parameters.separators=,
calltip.cmake.parameters.end=)
keywords.$(file.patterns.cmake)=add_compile_options \
add_custom_command \
add_custom_target \
add_definitions \
add_dependencies \
add_executable \
add_library \
add_subdirectory \
add_test \
aux_source_directory \
break \
build_command \
cmake_host_system_information \
cmake_minimum_required \
cmake_policy \
configure_file \
continue \
create_test_sourcelist \
define_property \
elseif \
else \
enable_language \
enable_testing \
endforeach \
endfunction \
endif \
endmacro \
endwhile \
execute_process \
export \
file \
find_file \
find_library \
find_package \
find_path \
find_program \
fltk_wrap_ui \
foreach \
function \
get_cmake_property \
get_directory_property \
get_filename_component \
get_property \
get_source_file_property \
get_target_property \
get_test_property \
if \
include_directories \
include_external_msproject \
include_regular_expression \
include \
install \
link_directories \
link_libraries \
list \
load_cache \
load_command \
macro \
mark_as_advanced \
math \
message \
option \
project \
qt_wrap_cpp \
qt_wrap_ui \
remove_definitions \
return \
separate_arguments \
set_directory_properties \
set_property \
set \
set_source_files_properties \
set_target_properties \
set_tests_properties \
site_name \
source_group \
string \
target_compile_definitions \
target_compile_features \
target_compile_options \
target_include_directories \
target_link_libraries \
target_sources \
try_compile \
try_run \
unset \
variable_watch \
while
keywords2.$(file.patterns.cmake)=ABSOLUTE \
ABSTRACT \
ADDITIONAL_MAKE_CLEAN_FILES \
AFTER \
ALIAS \
ALL \
ALPHABET \
AND \
APPEND \
APPEND_STRING \
APPLE \
ARCHIVE \
ARGS \
ARG_VAR \
ASCII \
BEFORE \
BORLAND \
BRIEF_DOCS \
BUNDLE \
BYPRODUCTS \
CACHE \
CACHED_VARIABLE \
CACHE_VARIABLES \
CLEAR \
CMAKE_COMPILER_2005 \
CMAKE_FIND_ROOT_PATH_BOTH \
CMAKE_FLAGS \
CODE \
COMMAND \
COMMANDS \
COMMAND_NAME \
COMMENT \
COMP \
COMPARE \
COMPILE_DEFINITIONS \
COMPILE_FLAGS \
COMPILE_OUTPUT_VARIABLE \
COMPILE_RESULT_VAR \
COMPONENT \
COMPONENTS \
CONCAT \
CONDITION \
CONFIG \
CONFIGS \
CONFIGURATION \
CONFIGURATIONS \
CONFIGURE \
CONTENT \
COPY \
COPYONLY \
COPY_FILE \
COPY_FILE_ERROR \
CRLF \
CYGWIN \
DBAR \
DEFINED \
DEFINE_SYMBOL \
DEFINITION \
DEPENDS \
DESTINATION \
DFOO \
DIRECTORY \
DIRECTORY_PERMISSIONS \
DOC \
DOS \
DOWNLOAD \
ENV \
EQUAL \
ERROR_FILE \
ERROR_QUIET \
ERROR_STRIP_TRAILING_WHITESPACE \
ERROR_VARIABLE \
ESCAPE_QUOTES \
EXACT \
EXCLUDE \
EXCLUDE_FROM_ALL \
EXISTS \
EXPORT \
EXPORT_LINK_INTERFACE_LIBRARIES \
EXPORT_MACRO \
EXPR \
EXT \
EXTRA_INCLUDE \
FATAL_ERROR \
FILE \
FILES \
FILES_MATCHING \
FILE_PERMISSIONS \
FIND \
FOLLOW_SYMLINKS \
FORCE \
FRAMEWORK \
FULL_DOCS \
FUNCTION \
GENERATE \
GENERATED \
GENEX_STRIP \
GET \
GLOB \
GLOBAL \
GLOB_RECURSE \
GREATER \
GROUP_SIZE \
GUARD \
GUID \
HEADER_FILE_ONLY \
HEADER_LOCATION \
HEX \
HINTS \
IMMEDIATE \
IMPLICIT_DEPENDS \
IMPORTED \
IN \
INCLUDES \
INCLUDE_DIRECTORIES \
INCLUDE_INTERNALS \
INCLUDE_REGULAR_EXPRESSION \
INHERITED \
INPUT \
INPUT_FILE \
INSERT \
INSTALL \
INTERFACE \
IS_ABSOLUTE \
IS_DIRECTORY \
IS_NEWER_THAN \
IS_SYMLINK \
ITEMS \
LANGUAGES \
LD_LIBRARY_PATH \
LENGTH \
LESS \
LF \
LIBRARY \
LIMIT \
LINK_DIRECTORIES \
LINK_FLAGS \
LINK_INTERFACE_LIBRARIES \
LINK_LIBRARIES \
LINK_PRIVATE \
LINK_PUBLIC \
LISTS \
LOCATION \
LOCK \
MACOSX_BUNDLE \
MACROS \
MAIN_DEPENDENCY \
MAKE_C_IDENTIFIER \
MAKE_DIRECTORY \
MATCH \
MATCHALL \
MATCHES \
MD5 \
MESSAGE_NEVER \
MINGW \
MODULE \
MSVC \
MSVC60 \
MSVC70 \
MSVC71 \
MSVC80 \
MSVC_IDE \
MSYS \
NAME \
NAMELINK_ONLY \
NAMELINK_SKIP \
NAMES \
NAMESPACE \
NAMES_PER_DIR \
NAME_WE \
NEW \
NEWLINE_STYLE \
NOT \
NOTEQUAL \
NO_CMAKE_BUILDS_PATH \
NO_CMAKE_ENVIRONMENT_PATH \
NO_CMAKE_FIND_ROOT_PATH \
NO_CMAKE_PACKAGE_REGISTRY \
NO_CMAKE_PATH \
NO_CMAKE_SYSTEM_PACKAGE_REGISTRY \
NO_CMAKE_SYSTEM_PATH \
NO_DEFAULT_PATH \
NO_MODULE \
NO_POLICY_SCOPE \
NO_SOURCE_PERMISSIONS \
NO_SYSTEM_ENVIRONMENT_PATH \
NO_SYSTEM_PATH \
OBJECT \
OBJECT_DEPENDS \
OFF \
OFFSET \
OLD \
ON \
ONLY \
ONLY_CMAKE_FIND_ROOT_PATH \
OPTIONAL \
OPTIONAL_COMPONENTS \
OR \
OUTPUT \
OUTPUT_FILE \
OUTPUT_QUIET \
OUTPUT_STRIP_TRAILING_WHITESPACE \
OUTPUT_VARIABLE \
PACKAGE \
PARENT_SCOPE \
PATH \
PATHS \
PATH_SUFFIXES \
PATTERN \
PERMISSIONS \
PLATFORM \
POLICY \
POP \
POST_BUILD \
POST_INSTALL_SCRIPT \
PREFIX \
PREORDER \
PRE_BUILD \
PRE_INSTALL_SCRIPT \
PRE_LINK \
PRIVATE \
PRIVATE_HEADER \
PROCESS \
PROGRAM \
PROGRAMS \
PROGRAM_ARGS \
PROJECT \
PROJECT_NAME \
PROPERTIES \
PROPERTY \
PUBLIC \
PUBLIC_HEADER \
PUSH \
QUERY \
QUIET \
RANDOM \
RANDOM_SEED \
RANGE \
READ \
READ_WITH_PREFIX \
REGEX \
REGULAR_EXPRESSION \
RELATIVE \
RELATIVE_PATH \
RELEASE \
REMOVE \
REMOVE_AT \
REMOVE_DUPLICATES \
REMOVE_ITEM \
REMOVE_RECURSE \
RENAME \
REPLACE \
REQUIRED \
RESOURCE \
RESULT \
RESULT_VAR \
RESULT_VARIABLE \
RETURN_VALUE \
REVERSE \
RUNTIME \
RUNTIME_DIRECTORY \
RUN_OUTPUT_VARIABLE \
RUN_RESULT_VAR \
SCRIPT \
SEND_ERROR \
SET \
SHA1 \
SHA224 \
SHA256 \
SHA384 \
SHA512 \
SHARED \
SORT \
SOURCE \
SOURCES \
STATIC \
STATUS \
STREQUAL \
STRGREATER \
STRINGS \
STRIP \
STRLESS \
SUBSTRING \
SUFFIX \
SYSTEM \
TARGET \
TARGETS \
TEST \
TIMEOUT \
TIMESTAMP \
TOLOWER \
TOUPPER \
TO_CMAKE_PATH \
TO_NATIVE_PATH \
TYPE \
UNIX \
UNKNOWN \
UPLOAD \
UPPER \
USES_TERMINAL \
USE_SOURCE_PERMISSIONS \
UTC \
UUID \
VAR \
VAR2 \
VARIABLE \
VARIABLES \
VERBATIM \
VERSION \
VERSION_EQUAL \
VERSION_GREATER \
VERSION_LESS \
WATCOM \
WIN32 \
WINDOWS_COMMAND \
WORKING_DIRECTORY \
WRAP_EXCLUDE \
WRITE
keywords3.$(file.patterns.cmake)= build_name \
exec_program \
export_library_dependencies \
install_files \
install_programs \
install_targets \
make_directory \
output_required_files \
remove \
subdir_depends \
subdirs \
use_mangled_mesa \
utility_source \
variable_requires \
write_file \
BUILD_NAME \
EXEC_PROGRAM \
EXPORT_LIBRARY_DEPENDENCIES \
INSTALL_FILES \
INSTALL_PROGRAMS \
INSTALL_TARGETS \
MAKE_DIRECTORY \
OUTPUT_REQUIRED_FILES \
REMOVE \
SUBDIR_DEPENDS \
SUBDIRS \
USE_MANGLED_MESA \
UTILITY_SOURCE \
VARIABLE_REQUIRES \
WRITE_FILE

# innosetup
#import $(ProgramFiles)\SciTE\inno
if PLAT_WIN
	command.build.$(file.patterns.inno)=$(innosetup) "$(FilePath)"

# makefile
file.patterns.make=makefile;Makefile;*.mak;configure;*.mk

# markdown
comment.block.markdown=>
file.patterns.markdown=*.md;*.markdown
indent.maintain.$(file.patterns.markdown)=1
lexer.$(file.patterns.markdown)=markdown
use.tabs.$(file.patterns.markdown)=0
filter.markdown=Markdown (md markdown)|$(file.patterns.markdown)|
command.build.subsystem.$(file.patterns.markdown)=2
if PLAT_WIN
	command.build.$(file.patterns.markdown)="$(markdown.rendering.file)"
if PLAT_UNIX
	command.build.$(file.patterns.markdown)=xdg-open $(markdown.rendering.file)
command.name.21.$(file.patterns.markdown)=
command.save.before.21.$(file.patterns.markdown)=2
command.21.$(file.patterns.markdown)=$(markdown.script) -c $(SciteUserHome)/.scite/markdown_py.json -x mdx_xhtml_wrap -x mdx_del_ins -x mdx_cite -x markdown.extensions.extra -x markdown.extensions.meta -x markdown.extensions.sane_lists -x markdown.extensions.smarty -x markdown.extensions.toc -x markdown.extensions.wikilinks -f "$(markdown.rendering.file)" "$(FilePath)"
user.shortcuts=Ctrl+3|1121|

# python
indent.python.colon=1
command.go.*.py=$(python) -u "$(FileNameExt)"
command.go.*.pyw=$(python) -u "$(FileNameExt)"

# xml-friendly formats
file.patterns.xlf=*.xlf;*.xliff
lexer.$(file.patterns.xlf)=xml
file.patterns.tmx=*.tmx
lexer.$(file.patterns.tmx)=xml
command.go.subsystem.$(file.patterns.xml)=2
command.go.$(file.patterns.xml)="$(FilePath)"
command.go.subsystem.$(file.patterns.xlf)=2
command.go.$(file.patterns.xlf)="$(FilePath)"
command.go.subsystem.$(file.patterns.tmx)=2
command.go.$(file.patterns.tmx)="$(FilePath)"

#
# tools
#

# remove empty lines
command.subsystem.0.*=3
command.name.0.*=Remove Empty Lines
command.0.*=RemoveEmptyLines
command.save.before.0.*=2

# wrapping
command.subsystem.1.*=3
command.name.1.*=Wrap Text
command.1.*=WrapAllText
command.save.before.1.*=2
command.subsystem.2.*=3
command.name.2.*=Unwrap Text
command.2.*=UnwrapAllText
command.save.before.2.*=2

# ctags support
if PLAT_WIN
	ctags.bin="$(ProgramFiles)\ctags\ctags.exe"
	readtags.bin="$(ProgramFiles)\ctags\readtags.exe"
	command.2.$(file.patterns.cpp)=cmd /c "$(readtags.bin) -e -t$(tags.data.file) $(CurrentWord)"
	command.3.$(file.patterns.cpp)=cmd /c "$(ctags.bin) $(ctags.options) $(project.source.dir)&&$(ctags.bin) -a $(ctags.options) $(project.include.dir)"
	tags.data.file="$(SciteUserHome)/_scite.ctags"
if PLAT_UNIX
	ctags.bin=/usr/bin/ctags
	readtags.bin=...
	command.2.$(file.patterns.cpp)=$(readtags.bin) -e -t$(tags.data.file) $(CurrentWord)
	command.3.$(file.patterns.cpp)=$(ctags.bin) $(ctags.options) $(project.source.dir)&&$(ctags.bin) -a $(ctags.options) $(project.include.dir)
	tags.data.file="$(SciteUserHome)/.scite.ctags"
ctags.options=--extra=+q -R -f$(tags.data.file) --excmd=pattern
command.subsystem.2.$(file.patterns.cpp)=0
command.name.2.$(file.patterns.cpp)=Find Tag
command.subsystem.3.$(file.patterns.cpp)=0
command.name.3.$(file.patterns.cpp)=Build Tags

#~ # astyle
#~ if PLAT_WIN
#~ 	astyle.bin="$(ProgramFiles)\Astyle\bin\AStyle.exe"
#~ 	astyle.options.file.path="$(SciteUserHome)/_scite.astylerc"
#~ if PLAT_UNIX
#~ 	astyle.bin=/usr/bin/astyle
#~ 	astyle.options.file.path="$(SciteUserHome)/.scite.astylerc"
#~ command.name.4.$(file.patterns.cpp)=Format with Artistic Style
#~ command.4.$(file.patterns.cpp)=$(astyle.bin) --suffix=none --options=$(astyle.options.file.path) --preserve-date "$(FilePath)"
#~ command.is.filter.4.$(file.patterns.cpp)=1
#~ command.save.before.4.$(file.patterns.cpp)=1

#~ # uncrustify
#~ if PLAT_WIN
#~ 	uncrustify.bin="$(ProgramFiles)\Uncrustify\uncrustify.exe"
#~ 	uncrustify.options.file.path="$(SciteUserHome)\_uncrustify.cfg"
#~ if PLAT_UNIX
#~ command.name.4.$(file.patterns.cpp)=Format with Uncrustify
#~ command.4.$(file.patterns.cpp)=$(uncrustify.bin) -c $(uncrustify.options.file.path) -f "$(FilePath)" -o "$(FilePath)"
#~ command.is.filter.4.$(file.patterns.cpp)=1
#~ command.save.before.4.$(file.patterns.cpp)=1

# clang-format
if PLAT_WIN
	clang-format.bin=
if PLAT_UNIX
	clang-format.bin=clang-format
command.name.4.$(file.patterns.cpp)=Format with ClangFormat
command.4.$(file.patterns.cpp)=$(clang-format.bin) -i "$(FilePath)"
command.is.filter.4.$(file.patterns.cpp)=1
command.save.before.4.$(file.patterns.cpp)=1

#~ #cpplint
#~ if PLAT_WIN
#~ 	cpplint.file.path=C:\Users\dex\Downloads\tools\cpplint.py
#~ 	cpplint.options.file.path="$(SciteUserHome)/.scite.astylerc"
#~ if PLAT_UNIX
#~ command.name.5.$(file.patterns.cpp)=Check with Google cpplint
#~ command.5.$(file.patterns.cpp)=$(python) $(cpplint.file.path) "$(FilePath)"
#~ command.subsystem.5.$(file.patterns.cpp)=0

# cppcheck
if PLAT_WIN
	cppcheck.bin="$(ProgramFiles)\Cppcheck\cppcheck.exe"
	cppcheck.options=-U_DEBUG -DDEX_INTEGRATE -D__cplusplus -I $(project.include.dir) --template="{file}({line}) : {severity}: {message}" --enable=all
	#~ cppcheck.options=-U_DEBUG -DDEX_INTEGRATE -D__cplusplus -I $(project.include.dir) --template="{file}({line}) : {severity}: {message}"
	command.name.6.$(file.patterns.cpp)=Analyze with Cppcheck
	command.6.$(file.patterns.cpp)=$(cppcheck.bin) $(cppcheck.options) "$(FilePath)"

# htmltidy support for xml
if PLAT_WIN
	tidy.bin="$(ProgramFiles)\htmltidy\tidy.exe"
if PLAT_UNIX
	tidy.bin=/usr/bin/tidy
tidy.file.patterns=$(file.patterns.xml);$(file.patterns.xlf);$(file.patterns.tmx)
command.name.3.$(tidy.file.patterns)=Indent
command.3.$(tidy.file.patterns)=$(tidy.bin) -modify -indent -wrap -quiet -xml "$(FilePath)"
command.is.filter.3.$(tidy.file.patterns)=1
command.save.before.3.$(tidy.file.patterns)=1
command.name.4.$(tidy.file.patterns)=Validate
command.4.$(tidy.file.patterns)=$(tidy.bin) -errors -quiet -xml "$(FilePath)"
command.save.before.4.$(tidy.file.patterns)=1

# htmltidy support for html
command.name.3.$(file.patterns.html)=Indent
command.3.$(file.patterns.html)=$(tidy.bin) -modify -indent -wrap -quiet --output-html yes --indent auto --tidy-mark no "$(FilePath)"
command.is.filter.3.$(file.patterns.html)=1
command.save.before.3.$(file.patterns.html)=1
command.name.4.$(file.patterns.html)=Validate
command.4.$(file.patterns.html)=$(tidy.bin) -errors -quiet "$(FilePath)"
command.save.before.4.$(file.patterns.html)=1
command.name.5.$(file.patterns.html)=Convert to XHTML
command.5.$(file.patterns.html)=$(tidy.bin) -modify -quiet -asxhtml --tidy-mark no "$(FilePath)"
command.is.filter.5.$(file.patterns.html)=1
command.save.before.5.$(file.patterns.html)=1

# snippets
command.name.7.*=Insert Snippet
command.7.*=dostring modules.scite.snippets.insert()
command.mode.7.*=subsystem:lua,savebefore:no
command.name.8.*=Cancel Snippet
command.8.*=dostring modules.scite.snippets.cancel_current()
command.mode.8.*=subsystem:lua,savebefore:no
command.name.9.*=List Snippets
command.9.*=dostring modules.scite.snippets.list()
command.mode.9.*=subsystem:lua,savebefore:no

# ansi to hex
command.subsystem.20.$(file.patterns.cpp)=3
command.name.20.$(file.patterns.cpp)=Hexify Selection
command.20.$(file.patterns.cpp)=AnsiToHexSelection
command.save.before.20.$(file.patterns.cpp)=2

# hex to ansi
command.subsystem.22.$(file.patterns.cpp)=3
command.name.22.$(file.patterns.cpp)=Ansify Hex Selection
command.22.$(file.patterns.cpp)=HexToAnsiSelection
command.save.before.22.$(file.patterns.cpp)=2

# escape xml predefined entities (xml files)
command.subsystem.20.$(file.patterns.xml)=3
command.name.20.$(file.patterns.xml)=Escape Selection
command.20.$(file.patterns.xml)=XmlEscapeSelection
command.save.before.20.$(file.patterns.xml)=2

# unescape xml predefined entities (xml files)
command.subsystem.21.$(file.patterns.xml)=3
command.name.21.$(file.patterns.xml)=Unescape Selection
command.21.$(file.patterns.xml)=XmlUnescapeSelection
command.save.before.21.$(file.patterns.xml)=2

# escape xml predefined entities (html files)
command.subsystem.20.$(file.patterns.html)=3
command.name.20.$(file.patterns.html)=Escape Selection
command.20.$(file.patterns.html)=XmlEscapeSelection
command.save.before.20.$(file.patterns.html)=2

# unescape xml predefined entities (html files)
command.subsystem.21.$(file.patterns.html)=3
command.name.21.$(file.patterns.html)=Unescape Selection
command.21.$(file.patterns.html)=XmlUnescapeSelection
command.save.before.21.$(file.patterns.html)=2

#
# styles
#

if USE_CUSTOM_COLOURS

	# output pane
	style.errorlist.32=
	style.errorlist.0=
	style.errorlist.1=$(style.errorlist)
	style.errorlist.2=$(style.errorlist)
	style.errorlist.3=$(style.errorlist)
	style.errorlist.4=$(style.statement)
	style.errorlist.5=$(style.errorlist)
	style.errorlist.6=$(style.errorlist)
	style.errorlist.7=$(style.errorlist)
	style.errorlist.8=$(style.errorlist)
	style.errorlist.9=$(style.errorlist)
	style.errorlist.10=$(style.diffchange)
	style.errorlist.11=$(style.diffadd)
	style.errorlist.12=$(style.diffdelete)
	style.errorlist.13=$(style.difftext)
	style.errorlist.14=$(style.errorlist)
	style.errorlist.15=$(style.errorlist)
	style.errorlist.16=$(style.errorlist)
	style.errorlist.17=$(style.errorlist)
	style.errorlist.18=$(style.errorlist)
	style.errorlist.19=$(style.errorlist)
	style.errorlist.20=$(style.errorlist)
	style.errorlist.21=$(style.errorlist)
	style.errorlist.22=$(style.includepath)

	style.diff.0=
	style.diff.1=$(style.comment)
	style.diff.2=$(style.statement)
	style.diff.3=$(style.directory)
	style.diff.4=$(style.difftext)
	style.diff.5=$(style.diffdelete)
	style.diff.6=$(style.diffadd)
	style.diff.7=$(style.diffchange)

	# inline errors
	style.error.0=$(style.defaultmsg)
	style.error.1=$(style.warningmsg)
	style.error.2=$(style.errormsg)
	style.error.3=$(style.fatalmsg)

	# bash
	style.bash.0=
	style.bash.1=$(colour.error)
	style.bash.2=$(style.comment)
	style.bash.3=$(style.number)
	style.bash.4=$(style.keyword)
	style.bash.5=$(style.string)
	style.bash.6=$(style.char)
	style.bash.7=$(style.operator)
	style.bash.8=$(style.identifier)
	style.bash.9=$(style.variable)
	style.bash.10=$(style.variable),bold
	style.bash.11=$(style.command.substitution)
	style.bash.12=$(style.preproc)
	style.bash.13=$(style.preproc)
	braces.bash.style=7

	# basic
	style.vb.0=
	style.vb.1=$(style.comment)
	style.vb.2=$(style.number)
	style.vb.3=$(style.keyword)
	style.vb.4=$(style.string)
	style.vb.5=$(style.preproc)
	style.vb.6=$(style.operator)
	style.vb.7=$(style.operator)
	style.vb.8=fore:#33ff00
	style.vb.9=fore:#33ff00
	style.vb.10=$(style.keyword)
	style.vb.11=fore:#33ff00
	style.vb.12=fore:#33ff00

	# batch
	style.batch.0=
	style.batch.1=$(style.comment)
	style.batch.2=$(style.keyword)
	style.batch.3=$(style.label),eolfilled
	style.batch.4=$(style.number)
	style.batch.5=$(style.command)
	style.batch.6=$(style.variable)
	style.batch.7=$(style.operator)

	# conf
	style.conf.0=
	style.conf.1=$(style.comment)
	style.conf.2=$(style.number)
	style.conf.3=$(style.tag)
	style.conf.4=$(style.operator)
	style.conf.5=$(style.attribute)
	style.conf.6=$(style.string)
	style.conf.7=$(style.operator)
	style.conf.8=$(style.keyword)
	style.conf.9=$(style.tag)

	# cpp
	# ---------------------------------------------
	# keywords  -> SCE_C_WORD                   = 5
	# keywords2 -> SCE_C_WORD2                  = 16
	# keywords3 -> SCE_C_COMMENTDOCKEYWORD      = 17
	# keywords4 -> SCE_C_GLOBALCLASS            = 19
	# keywords6 -> SCE_C_TASKMARKER             = 26

	style.cpp.0=
	style.cpp.1=$(style.comment)
	style.cpp.2=$(style.comment)
	style.cpp.3=$(style.comment)
	style.cpp.4=$(style.number)
	style.cpp.5=$(style.keyword)
	style.cpp.6=$(style.string)
	style.cpp.7=$(style.character)
	style.cpp.8=$(style.boolean)
	style.cpp.9=$(style.preproc)
	style.cpp.10=$(style.operator)
	style.cpp.11=$(style.default)
	style.cpp.12=eolfilled
	style.cpp.13=eolfilled
	style.cpp.14=
	style.cpp.15=$(style.comment)
	style.cpp.16=$(style.special)
	style.cpp.17=$(style.specialcomment)
	style.cpp.18=$(style.specialcomment)
	style.cpp.19=
	style.cpp.20=$(style.string)
	style.cpp.21=$(style.string)
	style.cpp.22=$(style.string)
	style.cpp.23=$(style.comment)
	style.cpp.26=$(style.taskmarker)

	#
	# cmake
	#
	style.cmake.0=

	# comment
	style.cmake.1=$(style.comment)

	# string double quote
	style.cmake.2=$(style.string)

	# string left quote
	style.cmake.3=back:#FF0000

	# string right quote
	style.cmake.4=back:#FF0000

	# function
	style.cmake.5=$(style.function)

	# variable
	style.cmake.6=$(style.special)

	# label
	style.cmake.7=$(style.label)

	# user defined (keyword3)
	style.cmake.8=$(style.deprecated)

	# while
	style.cmake.9=$(style.keyword)

	# for-each
	style.cmake.10=$(style.keyword)

	# if def
	style.cmake.11=$(style.keyword)

	# macro def
	style.cmake.12=$(style.keyword)

	# variable within string
	style.cmake.13=$(style.string),bold

	# number
	style.cmake.14=$(style.number)

	# css
	style.css.32=
	style.css.0=$(style.delimiter)
	style.css.1=$(style.statement)
	style.css.2=$(style.special)
	style.css.3=$(style.special)
	style.css.4=$(style.errormsg)
	style.css.5=$(style.operator)
	style.css.6=$(style.identifier)
	style.css.7=$(style.errormsg)
	style.css.8=$(style.string)
	style.css.9=$(style.comment)
	style.css.10=$(style.number)
	style.css.11=
	style.css.12=$(style.preproc)
	style.css.13=$(style.string)
	style.css.14=$(style.string)
	style.css.15=$(style.identifier)
	style.css.16=$(style.normal)

	# html
	style.hypertext.0=
	style.hypertext.1=$(style.tag)
	style.hypertext.2=$(style.tag)
	style.hypertext.3=$(style.attribute)
	style.hypertext.4=$(style.attribute)
	style.hypertext.5=$(style.number)
	style.hypertext.6=$(style.string)
	style.hypertext.7=$(style.string)
	style.hypertext.8=
	style.hypertext.9=$(style.comment)
	style.hypertext.10=$(style.float)
	style.hypertext.11=$(style.tag)
	style.hypertext.12=$(style.comment)
	style.hypertext.13=$(style.comment)
	style.hypertext.14=$(style.folded)
	style.hypertext.16=$(style.folded)
	style.hypertext.17=$(style.float),eolfilled
	style.hypertext.18=
	style.hypertext.19=$(style.number)
	style.hypertext.20=$(style.comment)
	style.hypertext.21=$(style.float)
	style.hypertext.22=$(style.float)
	style.hypertext.23=$(style.float)
	style.hypertext.24=$(style.float)
	style.hypertext.25=$(style.float)
	style.hypertext.26=$(style.float)
	style.hypertext.27=$(style.float)
	style.hypertext.28=$(style.float)
	style.hypertext.29=$(style.float)
	style.hypertext.31=$(style.float)
	style.hypertext.34=
	style.hypertext.35=

	# inno setup
	style.inno.0=
	style.inno.1=$(style.comment)
	style.inno.2=$(style.label)
	style.inno.3=$(style.identifier)
	style.inno.4=$(style.section),bold
	style.inno.5=$(style.preproc)
	style.inno.6=$(style.preproc)
	style.inno.7=$(style.comment)
	style.inno.8=$(style.keyword)
	style.inno.9=$(style.keyword)
	style.inno.10=$(style.string)
	style.inno.11=$(style.string)

	# lua
	style.lua.32=
	style.lua.0=
	style.lua.1=$(style.comment)
	style.lua.2=$(style.comment)
	style.lua.3=
	style.lua.4=$(style.number)
	style.lua.5=$(style.keyword)
	style.lua.6=$(style.string)
	style.lua.7=$(style.character)
	style.lua.8=$(style.string)
	style.lua.9=$(style.preproc)
	style.lua.10=$(style.operator)
	style.lua.11=$(style.identifier)
	style.lua.12=eolfilled
	style.lua.13=$(style.float)
	style.lua.14=$(style.float)
	style.lua.15=$(style.float)
	style.lua.16=$(style.float)
	style.lua.17=$(style.float)
	style.lua.18=$(style.float)
	style.lua.19=$(style.float)
	style.lua.20=$(style.label)

	# makefile
	style.makefile.0=$(style.normal)
	style.makefile.1=$(style.comment)
	style.makefile.2=$(style.preproc)
	style.makefile.3=$(style.variable)
	style.makefile.4=$(style.operator)
	style.makefile.5=$(style.target)
	style.makefile.9=$(style.error),eolfilled
	style.makefile.34=
	style.makefile.35=

	# properties
	style.props.1=$(style.comment)
	style.props.2=$(style.section)
	style.props.3=$(style.operator)
	style.props.4=
	style.props.5=$(style.identifier)
	style.props.34=
	style.props.35=

	# python
	style.python.0=
	style.python.1=$(style.comment)
	style.python.2=$(style.number)
	style.python.3=$(style.string)
	style.python.4=$(style.string)
	style.python.5=$(style.keyword)
	style.python.6=$(style.string)
	style.python.7=$(style.string)
	style.python.8=$(style.identifier)
	style.python.9=$(style.function)
	style.python.10=$(style.operator)
	style.python.11=
	style.python.12=$(style.comment)
	style.python.13=eolfilled
	style.python.14=$(style.keyword)
	style.python.15=$(style.float)
	style.python.34=
	style.python.35=

	# sql
	style.sql.0=
	style.sql.1=$(style.comment)
	style.sql.2=$(style.comment)
	style.sql.3=$(style.comment)
	style.sql.4=$(style.number)
	style.sql.5=$(style.keyword)
	style.sql.6=$(style.string)
	style.sql.7=$(style.string)
	style.sql.8=$(style.preproc)
	style.sql.9=eolfilled
	style.sql.10=$(style.operator)
	style.sql.11=
	style.sql.12=eolfilled
	style.sql.13=$(style.comment)
	style.sql.15=$(style.comment)
	style.sql.16=
	style.sql.17=
	style.sql.18=
	style.sql.19=
	style.sql.20=
	style.sql.21=
	style.sql.22=

	# xml
	style.xml.0=
	style.xml.1=$(style.tag)
	style.xml.2=$(style.function)
	style.xml.3=$(style.attribute)
	style.xml.4=$(style.identifier)
	style.xml.5=$(style.number)
	style.xml.6=$(style.string)
	style.xml.7=$(style.string)
	style.xml.8=
	style.xml.9=$(style.comment)
	style.xml.10=$(style.float)
	style.xml.11=$(style.tag)
	style.xml.12=$(style.comment)
	style.xml.13=$(style.comment)
	style.xml.17=$(style.float),eolfilled
	style.xml.18=$(style.identifier)
	style.xml.19=$(style.number)
	style.xml.21=$(style.float)
	style.xml.22=$(style.float)
	style.xml.23=$(style.function)
	style.xml.24=$(style.string)
	style.xml.25=$(style.string)
	style.xml.26=$(style.error)
	style.xml.27=
	style.xml.28=$(style.macro)
	style.xml.29=$(style.comment)
	style.xml.31=$(style.special)
	braces.xml.style=31

	#
	# markdown
	#
	style.markdown.32=

	# special
	style.markdown.1=fore:$(colour.markdown.unused)

	# **strong**
	style.markdown.2=bold

	# __strong__
	style.markdown.3=bold

	# *emphasis*
	style.markdown.4=italics

	# _emphasis_
	style.markdown.5=italics

	# headings
	style.markdown.6=fore:$(colour.markdown.h1),bold
	style.markdown.7=fore:$(colour.markdown.h2),bold
	style.markdown.8=fore:$(colour.markdown.h3),bold
	style.markdown.9=fore:$(colour.markdown.h4),bold
	style.markdown.10=fore:$(colour.markdown.h5),bold
	style.markdown.11=fore:$(colour.markdown.h6),bold

	# prechar
	style.markdown.12=

	# bullets list
	style.markdown.13=fore:$(colour.markdown.list.bullets),bold

	# numbered items
	style.markdown.14=fore:$(colour.markdown.list.numbers),bold

	# blockquote
	style.markdown.15=fore:$(colour.markdown.blockquote),bold

	# ~~strikeout~~
	style.markdown.16=

	# hrule
	style.markdown.17=fore:$(colour.markdown.hrule),bold

	# link
	style.markdown.18=fore:$(colour.markdown.link),bold

	# `code`
	style.markdown.19=fore:$(colour.markdown.code)

	# ```[lang]
	# fenced
	# code
	# block
	#```
	style.markdown.20=fore:$(colour.markdown.code.block)

	#
	#    indented
	#    code
	#    block
	style.markdown.21=fore:$(colour.markdown.code.block)

	# comment
	style.markdown.22=fore:$(colour.markdown.unused)

	# option
	style.markdown.23=fore:$(colour.markdown.unused)

	# preproc
	style.markdown.24=fore:$(colour.markdown.unused)

	# postproc
	style.markdown.25=fore:$(colour.markdown.unused)

	#
	# yaml
	#

	# default
	style.yaml.0=

	# comment line
	style.yaml.1=$(style.comment)

	# value identifier
	style.yaml.2=$(style.identifier)

	# keyword value
	style.yaml.3=$(style.keyword)

	# numerical value
	style.yaml.4=$(style.number)

	# reference/repeating value
	style.yaml.5=$(style.function)

	# document delimiting line
	style.yaml.6=$(style.taskmarker)

	# text block marker
	style.yaml.7=$(style.string)

	# syntax error marker
	style.yaml.8=$(style.errormsg)

#
# arduino sketches support
#

# arduino file type
file.patterns.arduino=*.ino
*source.patterns.arduino=$(file.patterns.arduino);

filter.arduino=Arduino Sketch (*.ino)|$(file.patterns.arduino)|
*filter.arduino=$(filter.arduino)

# arduino syntax highlight
lexer.$(file.patterns.arduino)=cpp

# arduino keywords and library function names
arduino.library.keywords=pinMode \
digitalWrite \
digitalRead \
analogReference \
analogRead \
analogWrite \
analogReadResolution \
analogWriteResolution \
tone \
noTone \
shiftOut \
shiftIn \
pulseIn \
millis \
micros \
delay \
delayMicroseconds \
min \
max \
abs \
constrain \
map \
pow \
sqrt \
sin \
cos \
tan \
isAlphaNumeric \
isAlpha \
isAscii \
isWhitespace \
isControl \
isDigit \
isGraph \
isLowerCase \
isPrintable \
isPunct \
isSpace \
isUpperCase \
isHexadecimal \
randomSeed \
random \
lowByte \
highByte \
bitRead \
bitWrite \
bitSet \
bitClear \
bit \
attachInterrupt \
detatchInterrupt \
interrupts \
noInterrupts \
Serial \
Stream

arduino.lcd.keywords=begin \
clear \
home \
setCursor \
write \
print \
cursor \
noCursor \
blink \
noBlink \
display \
noDisplay \
scrollDisplayLeft \
scrollDisplayRight \
autoscroll \
noAutoscroll \
leftToRight \
rightToLeft \
createChar

arduino.wire.keywords=begin \
requestFrom \
beginTransmission \
endTransmission \
write \
available \
read \
onReceive \
onRequest

keywords.$(file.patterns.arduino)=$(keywordclass.cpp)
keywords2.$(file.patterns.arduino)=$(keywordclass2.cpp) \
$(arduino.library.keywords) \
$(arduino.lcd.keywords) \
$(arduino.wire.keywords)

# arduino api specs
api.$(file.patterns.arduino)=$(SciteUserHome)/.scite/api/cpp.api

# arduino device
if PLAT_UNIX
	arduino.board=arduino:avr:uno
	arduino.port=/dev/ttyACM0

# arduino commands
if PLAT_UNIX
	arduino.program=/opt/arduino-1.6.5-r5/arduino

arduino.command.invoke=$(arduino.program) --board $(arduino.board) --port $(arduino.port)
command.compile.$(file.patterns.arduino)=$(arduino.command.invoke) --verify $(FilePath)
command.build.$(file.patterns.arduino)=$(arduino.command.invoke) --upload $(FilePath)
