Home Download Buy Blog Forum Support

20100528 Beta

20100528 Beta

Postby jps on Fri May 28, 2010 1:30 pm

20100528 is out now, with a few indentation related fixes. The 'pasteAndInsert' command (Ctrl+V) is better behaved now.

The tab key behaviour has been tweaked too: when pressing tab on a blank line, the indentation will be calculated automatically, rather than just inserting a single tab. This is done via a new command 'reindent', which can be used to reindent any selected block of text automatically, if you to bind it to a key explicitly.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20100528 Beta

Postby Chortos-2 on Fri May 28, 2010 5:44 pm

Nice. You even added trimAutomaticWhitespace. ;)

Edit: the dynamic auto-indentation is quite erratic. For example, type this into a blank Python file using no manual indentation:
Code: Select all
if fdsa:
   if fdsa:
      fdsa
   else:
      fdsa
      if fdsa:
         fdsa
Then delete and replace the colons in lines 2 and 4 one at a time and watch the tabs move around. Now undo so that everything is fine again, select all lines but the first one and perform a reindent on them. Again, the indentation gets messed up.
Chortos-2
 
Posts: 16
Joined: Thu May 27, 2010 5:13 pm
Location: Riga, Latvia, the EU, Europe, Eurasia, the Earth, the Solar System, the Milky Way, the Universe

Re: 20100528 Beta

Postby jps on Sat May 29, 2010 12:37 am

This appears to be caused by turning trimAutomaticWhitespace off, I'll fix that for the next beta
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20100528 Beta

Postby jps on Sat May 29, 2010 1:29 am

20100529 is out now, which addresses this, and also fixed an annoying bug when pressing tab on a blank line with an unindented line above it.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20100528 Beta

Postby Chortos-2 on Sat May 29, 2010 10:06 am

Funny bug. Thanks, dynamic indentation behaves for me now. However, one glitch remains that I described above:
Chortos-2 wrote:Now select all lines but the first one and perform a reindent on them. Again, the indentation gets messed up.
(Specifically, all lines starting with else: are indented one tab too far.) I am not sure if I misunderstand the point of reindent, but I would say that reindenting a finely indented block should not visually change anything. Also, as far as my tests show, this one occurs irrespective of whether trimAutomaticWhitespace is on or off. :)
Chortos-2
 
Posts: 16
Joined: Thu May 27, 2010 5:13 pm
Location: Riga, Latvia, the EU, Europe, Eurasia, the Earth, the Solar System, the Milky Way, the Universe

Re: 20100528 Beta

Postby jps on Mon May 31, 2010 1:16 pm

Chortos-2 wrote:perform a reindent on them


Just to be sure, this is when using the 'reindent' command (you've bound it to a key?) on a block of text? If so, I think you're right: it'd be better if it behaved like paseAndIndent when used on a block, keeping the relative indentation of the text within the block.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20100528 Beta

Postby Chortos-2 on Mon May 31, 2010 1:41 pm

jps wrote:Just to be sure, this is when using the 'reindent' command (you've bound it to a key?) on a block of text?
Yes. I created a user key binding for it and used it on a multi-line selection.
Chortos-2
 
Posts: 16
Joined: Thu May 27, 2010 5:13 pm
Location: Riga, Latvia, the EU, Europe, Eurasia, the Earth, the Solar System, the Milky Way, the Universe

Re: 20100528 Beta

Postby edanm on Tue Jun 01, 2010 7:08 am

The new beta looks good. Haven't had time to test it much, but I'm pretty happy about a lot of the fixes (like the improved bracket auto-matching behavior).

Two minor annoyances:
Firstly, I'd expect shifting lines by using ctrl+shift+up/down to automatically adjust their indentation. This is pretty standard in a lot of editors.

Secondly, the way I select a lot of lines usually involves going to the first character on the first line, then doing shift+down until I get to the line I want.
This causes a problem every time I copy paste lines, since Sublime assumes I want all the other lines indented more than the first line.
This is how I've selected text for years, and I'm pretty sure many others also do this, so this might be something we'd like to fix (although I'm not sure what a fix would look like, actually). I think other editors also support this, since I've never had this problem before, but it might be smart to check how e.g. Eclipse handles this.
edanm
 
Posts: 131
Joined: Thu Mar 04, 2010 11:05 pm

Re: 20100528 Beta

Postby Anomareh on Tue Jun 01, 2010 7:47 am

I've been watching these threads and in doing so I've been very scared to update so I'm still on 0501. Is there anyway to disable ALL of this indent aware functionality? 90% of it seems like it's going to cause more annoyances than it'll solve.

Can anyone give me a quick run down of what keys I'll have to rebind and any settings I'll have to disable to get rid of that functionality, as well as anything that can't be turned off? Thanks.
Anomareh
 
Posts: 222
Joined: Thu Oct 01, 2009 7:32 pm

Re: 20100528 Beta

Postby sztanpet on Tue Jun 01, 2010 4:22 pm

You shouldn't see anything different if you switch out the bindings for pasteAndIndent with the usual paste (ctrl+v and ctrl+shift+v), and turn off trimAutomaticWhitespace in either the Default File Type setting or in the customized filetype.sublime file.
Which by the way I also both did, although I do see the usefulness of these, it irritates me at the present. (pasting with indent is very situation dependent and I usually paste from inside sublime where upon pasting everything now has double the whitespace)
sztanpet
 
Posts: 3
Joined: Fri May 28, 2010 3:58 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: agateriver and 7 guests