Sublime Forum

Line.Reindent does not work for comments

#1

Line.Reindent does not seem to work for comments (at least in C\C++ code) Is there a way to fix this?

0 Likes

PHP Comment Indenting
#2

Rephrase. How do you guys deal with this?

If I have some code

void helloWorld() {
int i;
/* comments*/
printf…

}

Is there a hack to get the comments indented or at least get the print statement indented?

Also, how do I make it indent 4 characters instead of 2?

0 Likes

#3

+1 to this question. I have just spent some time studying the sublime keymaps, and cant figure out why reindent ignores comments. (in javascript i where I noticed it) Compounding the issue: code lines below the comment get lined up with the comment, when re-indent is applied to them. So the end result is me having to always do manual indent/unindent-ing of comments.

0 Likes

#4

I test Sublime Text 3 and there reindent not working when big comment starting with /* and ending */ contains new lines.

0 Likes

#5

I can confirm this as well, ST3 build 3059.

0 Likes