Sublime Forum

Indent to open brace

#1

Hi, typically in C++ I indent code like this:

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.

0 Likes

#2

See “indent_to_bracket” option.

0 Likes