Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文字符串显示不正确 #119

Open
zb737472783 opened this issue May 17, 2016 · 4 comments
Open

中文字符串显示不正确 #119

zb737472783 opened this issue May 17, 2016 · 4 comments

Comments

@zb737472783
Copy link

bug
这是一整个字符串,却格式化成多个.

@yixiang
Copy link
Contributor

yixiang commented Jun 28, 2016

Just verified the behavior. However, this is a problem of the clang-format command, not a problem with the XCode-Clang-Format plugin. Please file a bug with clang-format. Find info here http://clang.llvm.org/OpenProjects.html

As a work around, you can just manually separate the string as below, the plugin won't mess up the formatting in that case. Please

@"山东省龙口市的肌肤上看见的疯狂世界东方时"
@"的疯狂送点福利时间到付款送来的风";

刚刚确证了你描述的行为。只不过这是一个clang-format命令的问题,不是这个插件的问题。插件只是通过调用clang-format命令来实现格式化。请报bug给clang-format。详情请见:

作为一个临时解决方案,你可以手动将字符串分段如下。

@"山东省龙口市的肌肤上看见的疯狂世界东方时"
@"的疯狂送点福利时间到付款送来的风";

请关闭这个问题。

@zb737472783
Copy link
Author

是需要调整那个参数,能说一下吗?

@zb737472783
Copy link
Author

BasedOnStyle: LLVM
BreakBeforeBraces: Linux
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
ObjCBlockIndentWidth: 4
TabWidth: 4
UseTab: Always
Language: Cpp
IndentWidth: 4
AlignTrailingComments: true
SpacesInParentheses: true
SpacesInContainerLiterals: true
SpacesInAngles: true
SpacesBeforeTrailingComments: 1
SpaceInEmptyParentheses: true
PenaltyExcessCharacter: 1
MaxEmptyLinesToKeep: 1
IndentCaseLabels: true
CommentPragmas: ''
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
AccessModifierOffset: 0
AlignEscapedNewlinesLeft: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackParameters: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 0
Cpp11BracedListStyle: false
DerivePointerBinding: false
IndentFunctionDeclarationAfterType: false
NamespaceIndentation: All
PenaltyBreakBeforeFirstCallParameter: 100
PenaltyBreakComment: 100
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 100
PenaltyReturnTypeOnItsOwnLine: 20
SpacesInCStyleCastParentheses: true
SpacesInContainerLiterals: true

@yixiang
Copy link
Contributor

yixiang commented Jun 28, 2016

不是调参数。是手动格式化成这样:

self.reserveOrderAddress =
    @"山东省龙口市的肌肤上看见的疯狂世界东方时"
    @"的疯狂送点福利时间到付款送来的风";

这样你下次自动格式化文件时候你的格式就不会被错误格式化了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants