C++ indentation indeed works better now!
Pressing enter in this case indents automatically:
if (1)|
and unindents when pressing enter here:
if (1)
foo;|
Please do not regress this behavior when fixing regressions.
C++ indentation indeed works better now!
Pressing enter in this case indents automatically:
if (1)|
and unindents when pressing enter here:
if (1)
foo;|
Please do not regress this behavior when fixing regressions.
There also seems to be a new quirk with Javadoc/PHPdoc-style comments (the /** … */-style comments) in this new build. Here is an example of a properly indented Javadoc/PHPdoc-style comment:
[code]/**
Not too bothered about it yet, as I don’t add these comments terribly often.
Always appreciate your great work!
@farmerpaul: check out the DocBlockr plugin (https://github.com/spadgos/sublime-jsdocs)
I came to say what zee said.
Python indentation is a bit annoying. I tried turning auto indentation off thinking that without it pressing Return would at least keep current indentation level (basically the only kind of auto-indent I really want), but it turns out that no, without auto-indent we always go back at the beginning of the line.
So I’m stuck with this new auto-indent.
Some aspects of this don’t seem to work for me. Specifically:
[code]/**
– becomes –
/**
When I try this, I do not get the second line as described
I am very pleased that you added this Ruby expansion.
But it should also work when a word is selected (like in TextMate).
+1 on this one - Python indenting seemed like it behaved better prior to the recent changes…
Agreed! I use the same style of coding for classes and functions, and this is a little annoying to correct all the time. Although I can understand that it is difficult to provide the best solution for everyone, I have a feeling that the first example you gave is a much more common coding style than the second indention style. Best style for me would be: don’t indent unless a brace, bracket or parenthesis has been opened but not been closed.
Cheerleading too soon
[code]if 1:
if 1:
if current < 8:
current = 8
s.set(“font_size”, current)
sublime.save_settings("Base File.sublime-settings")
class ResetFontSizeCommand(sublime_plugin.ApplicationCommand):
def run(self):
s = sublime.load_settings(“Base File.sublime-settings”)
[/code]
Try putting the cursor in front of class
and hitting enter
Regression in c/c++ indentation.
Pressing enter here:
/* foo
bar */
if (1)|
indents according to the second line of the comment which is now closed.
(I hope Jon has a good testing coverage for this because it seems it’s almost impossible to fix something without regressing other stuff. )
Actually what I’ve reported was not entirely precise.
It needs screenshots to show the problem because part of the problem is mixing tabs and spaces.
This is how example code looks like:
And this is what happens after pressing enter after respective lines:
[quote=“farmerpaul”]
)
Thanks @C0D312! Amazing.[/quote]
Glad you like it.
I’m also seeing some pretty annoying behaviour with auto indentation:
var foo,
bar,
baz;
|
Press enter:
var foo,
bar,
baz;
|
What was desired:
var foo,
bar,
baz;
|
I second this; I know I can use the key commands for indent/unindent rather than delete to accomplish this, but I’d rather stick to my muscle memory with delete and what I’m used to in every other text editor.