Comments (4)
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。详情请见:
作为一个临时解决方案,你可以手动将字符串分段如下。
@"山东省龙口市的肌肤上看见的疯狂世界东方时"
@"的疯狂送点福利时间到付款送来的风";
请关闭这个问题。
from clangformat-xcode.
是需要调整那个参数,能说一下吗?
from clangformat-xcode.
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
from clangformat-xcode.
不是调参数。是手动格式化成这样:
self.reserveOrderAddress =
@"山东省龙口市的肌肤上看见的疯狂世界东方时"
@"的疯狂送点福利时间到付款送来的风";
这样你下次自动格式化文件时候你的格式就不会被错误格式化了。
from clangformat-xcode.
Related Issues (20)
- Option -sort-includes HOT 5
- Just FYI – I've created AnyFormat plugin based on your ClangFormat
- Problems with Xcode 7.3
- Disable plugin if selected format from missing File
- Update clang-format (wrong Linux configuration)
- An error occurred when dealing with Chinese
- Cannot install on Xcode 8 HOT 4
- How to install? HOT 2
- Create home-brew cask for Xcode8 App HOT 1
- XCode 9 support HOT 17
- KeepEmptyLinesAtTheStartOfBlocks does not supported
- Which rule to use for C11 _Generic? HOT 2
- XCode 9 support HOT 1
- Is this still alive? HOT 2
- do you support xcode 11 HOT 2
- About #ifndef
- How to install ? http://alcatraz.io/ not available HOT 3
- integrate clang-tidy with this plugin.
- is this repo still in maintain stage?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clangformat-xcode.