Merge pull request #2716 from UAVenture/sublime_astyle_config

astyle configuration for Sublime
This commit is contained in:
Lorenz Meier 2015-08-18 12:07:53 +02:00
commit c3a7ef1d50
3 changed files with 34 additions and 19 deletions

View File

@ -33,7 +33,20 @@
{
"tab_size": 8,
"translate_tabs_to_spaces": false,
"highlight_line": true
"highlight_line": true,
"AStyleFormatter":
{
"options_c":
{
"use_only_additional_options": true,
"additional_options_file": "${project_path}/Tools/astylerc"
},
"options_c++":
{
"use_only_additional_options": true,
"additional_options_file": "${project_path}/Tools/astylerc"
}
}
},
"build_systems":
[

18
Tools/astylerc Normal file
View File

@ -0,0 +1,18 @@
indent=force-tab=8
style=linux
indent-preprocessor
indent-cases
break-blocks=all
pad-oper
pad-header
unpad-paren
keep-one-line-blocks
keep-one-line-statements
align-pointer=name
align-reference=name
-n #--suffix=none
ignore-exclude-errors-x
lineend=linux
exclude=EASTL
add-brackets
max-code-length=120

View File

@ -1,22 +1,6 @@
#!/bin/sh
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
astyle \
--style=linux \
--indent=force-tab=8 \
--indent-cases \
--indent-preprocessor \
--break-blocks=all \
--pad-oper \
--pad-header \
--unpad-paren \
--keep-one-line-blocks \
--keep-one-line-statements \
--align-pointer=name \
--align-reference=name \
--suffix=none \
--ignore-exclude-errors-x \
--lineend=linux \
--exclude=EASTL \
--add-brackets \
--max-code-length=120 \
--options=$DIR/astylerc \
--preserve-date \
$*