English 中文(简体)
Uncrustify: Single Line Method Names & Remove spaces between double asterisk
原标题:

Two related questions here.

1) What setting do I need to use to make multiline method name a single line? For example, I have this:

- (NSArray *)nodesForXPath:(NSString *)xpath
                namespaces:(NSDictionary *)namespaces
                     error:(NSError **)error {

Which my current config turns into this:

- (NSArray*)nodesForXPath:(NSString*)xpath
namespaces:(NSDictionary*)namespaces
error:(NSError * *)error {

But I want it to look like this:

- (NSArray*)nodesForXPath:(NSString*)xpath namespaces:(NSDictionary*)namespaces error:(NSError * *)error {

2) How can I remove spaces between double asterisks in method declarations?

I can post my current config if that would be helpful.

问题回答

I think this question should help. Looks like

align_oc_decl_colon = true

should do the trick for your declarations, and

align_var_def_colon = true

will help your definitions. Read the linked question, though, as it mentions several other related settings.

For #2, add the following option:

sp_between_ptr_star = remove

To remove the space between the double asterisks.





相关问题
How to make all text upper case / capital?

I want all texts in TextBlock, Label, MenuItem.Header to be displayed in upper case. The strings are taken from a ResourceDictionary e.g.: <TextBlock Text="{StaticResource String1}"/> <...

New Line Haskell

Hey。 关于本周的辅导,其中一个问题要求采用其他功能格式Line和格式List编制一个行文清单,从而形成一种功能格式。

Formatting comments in LaTeX s algorithmic environment

I want to typeset an algorithm in LaTeX. I m using the algorithmic package and environment to do so. Everything is working great except when I add comments (using COMMENT), they are output ...

How can I format columns without using Perl s format?

Often in Perl I want to print out column/row data, say, from a hash. This is simple: foreach my $k(keys %h) { print $k, " ", $h{$k}, " "; } However, if the key happens to have ...

NSDateFormat, super simple! Where am I screwing up?

Ok, this is really simple, maybe I m a getting a bit burnt out, but seems like it should work, Query XML feed, put out date string, format, display in a cell. The issue is I m a getting a NULL ...

A "safe" python HTML text formatting (ala textile)

I ve been looking around for an existing python library in the style of textile to format text for users to enter. If it was just me entering it, just textile would have been fine, but since the ...

热门标签