Sublime Forum

Dev Build 2172

#3

Nope.

Under HTML, insert a new tag (Ctrl+Alt+W) type ‘div’ say, then press Tab. Closing tag now jumps :frowning:

0 Likes

#4

It still has this problem: sublimetext.userecho.com/topic/8 … languages/

0 Likes

#5

Yeah, HTML tags are worse than before. The closing tag jumps back a tab when the cursor is between the opening and closing tag and you press enter.

0 Likes

#6

The PHP indentation is very annoying now, because I have to correct it every time manually.

Before when typing {:

[code] function count($table, $field)
{

}

[/code]
Now:

[code] function count($table, $field)
{

	}[/code]
0 Likes

#7

It’d be nice to be able to implement indentation as a plugin (possibly through sublime_plugin.EventListener).

0 Likes

#8

There’s a frustrating quirk with Python now (not sure, but don’t remember seeing it before), probably with other languages too:

You start with something like this (| = cursor):

class Foo: def foo(self): pass|
If you press enter, cursor moves to the next line aligned at the start of “pass”, which is to be expected. Now suppose you want to write another function: you press backspace to move the cursor 1 indent back, press enter and it jumps back to “pass” level again:

[code]class Foo:
def foo(self):
pass

    |

[/code]

While you could teach yourself to press enter first and then de-indent, the editor should probably keep in mind that I explicitly decreased the indentation level (by pressing backspace) and not just blindly use the source code.

0 Likes

#9

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. :smile:

0 Likes

#10

Indentation works better in Java, too. Yippee!

0 Likes

#11

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]/**

  • Description.
  • @param type $variable description

  • */[/code]
    Granted, I’ve never actually seen these kinds of comments auto-indented in SublimeText quite the same way I was used to in VIM, where each newline produces a new asterisk in the appropriate column as well as the correct number of spaces following it, but it has never really bothered me until now. Now, in Build 2172, SublimeText prefaces each newline of a PHPdoc-style comment with a tab/softtab. I have to hit backspace to delete it, then add a space, then the asterisk, then another space, before typing my intended line of text. Pre-build 2172 at least just started the line with a single space character, after which I could just add the asterisk and another space.

Not too bothered about it yet, as I don’t add these comments terribly often. :smile:

Always appreciate your great work!

0 Likes

#12

@farmerpaul: check out the DocBlockr plugin (https://github.com/spadgos/sublime-jsdocs)

0 Likes

#13

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.

0 Likes

#14

Some aspects of this don’t seem to work for me. Specifically:

[code]/**

  • Foo bar<>
    */

– becomes –

/**

  • Foo bar
  • |
    */
    [/code]

When I try this, I do not get the second line as described

0 Likes

#15

I am very pleased that you added this Ruby expansion.
But it should also work when a word is selected (like in TextMate).

0 Likes

#16

+1 on this one - Python indenting seemed like it behaved better prior to the recent changes…

0 Likes

#17

Yep, Python is royally fubarred

0 Likes

#18

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.

0 Likes

#19

2173 should address the above issues - please let me know if this isn’t the case.

0 Likes

#20

HTML and PHP seem to be working for me!

0 Likes

#21

Yay! Python works again 2

0 Likes

#22

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

0 Likes