Home Download Buy Blog Forum Support

Indent to open brace

Indent to open brace

Postby idemura on Thu Jun 20, 2013 5:47 pm

Hi, typically in C++ I indent code like this:
Code: Select all
printf("First name: %s Last name: %02d/%02d/%d\n",
       get_first_name(person),
       get_last_name(person),
       get_day_of_birth(person),
       get_month_of_birth(person),
       get_year_of_birth(person));

The idea is that each next other line indented to the position next to opening brace `(`. Sublime indents next line (where get_first_name is) to tab width, all others indented as I want. Is there any key combination/command to indent line to the position next to `(`? I start programming Clojure and this type of indentation is especially suitable.
idemura
 
Posts: 13
Joined: Mon Jun 25, 2012 9:55 am

Re: Indent to open brace

Postby FichteFoll on Mon Jun 24, 2013 12:29 pm

See "indent_to_bracket" option.
FichteFoll
 
Posts: 407
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany


Return to General Discussion

Who is online

Users browsing this forum: fizzicist, Google [Bot] and 30 guests