Home Download Buy Blog Forum Support

20100527 Beta

20100527 Beta

Postby jps on Thu May 27, 2010 2:09 pm

The 20100527 beta is out now, with changes centered around automatic indentation.

Firstly, the basic automatic indent system has been reworked: rather than using hard coded rules, it now uses TextMate preferences (decreaseIndentPattern and increaseIndentPattern in tmPreferences files) to determine when to increase and decrease the indentation level. The implementation goes something like this: when pressing enter, the desired amount of whitespace is inserted on the following line. This whitespace is marked with a magic tag, and it will be reevaluated as the line is edited. If the whitespace itself edited, or you start to edit another line, the magic tag will be removed, and the indentation on the line will be baked in.

The tag added to the whitespace is used for another purpose too: if you start editing another line without adding anything after the whitespace, the whitespace will be removed. This reduces the amount of unwanted trailing whitespace in files.

Another significant change is to the way paste works: when pasting in a block of lines, their indentation will be adjusted to match that of the cursor. You can paste with ctrl+shift+v to avoid this. This is a somewhat experimental change, and the behaviour may be reverted if it turns out to be annoying.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20100527 Beta

Postby edanm on Thu May 27, 2010 2:43 pm

Excellent, I'll have a look tonight.

Thanks :)
edanm
 
Posts: 131
Joined: Thu Mar 04, 2010 11:05 pm

Re: 20100527 Beta

Postby Chortos-2 on Thu May 27, 2010 5:46 pm

jps wrote:The tag added to the whitespace is used for another purpose too: if you start editing another line without adding anything after the whitespace, the whitespace will be removed. This reduces the amount of unwanted trailing whitespace in files.
It would be very nice to have a configuration option to turn this behaviour on or off.

Meanwhile, the new functionality works well. Thank you! :)
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: 20100527 Beta

Postby Incendium on Thu May 27, 2010 6:10 pm

Is the feature supposed to remove all empty lines from the clipboard when pasting?
Incendium
 
Posts: 10
Joined: Wed Nov 25, 2009 7:06 pm

Re: 20100527 Beta

Postby guillermooo on Thu May 27, 2010 8:31 pm

Looks like a bug to me...
guillermooo
 
Posts: 723
Joined: Thu Jul 23, 2009 9:06 am

Re: 20100527 Beta

Postby tgkeul on Thu May 27, 2010 9:20 pm

I'm not sure if this was introduced in the current beta.
The menu shows the keybindings of the default package instead of the user package.
I have to comment all replaced keybindings in default/default.sublime-keymap to show the actual keybindings in the menu. :cry:
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm

Re: 20100527 Beta

Postby GreyWyvern on Thu May 27, 2010 9:32 pm

Yesh, all my menu changes were overwritten by this update as well :|
GreyWyvern
 
Posts: 106
Joined: Fri Oct 23, 2009 7:08 pm
Location: Canadia

Re: 20100527 Beta

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

@tgkeul: It's always worked that way, although you raise a good point, it'd be better if it showed the most recent key binding for the command, rather than the first.

@sublimator: the 'magic tag' part is just tagging the region via the standard regions API (using the 'autows' key). It records in the per-selection meta info the original size of the region, to detect if it's been edited.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20100527 Beta

Postby sztanpet on Fri May 28, 2010 4:07 pm

this version just broke my @ (ctrl+alt+v) which is now the bind for invertselection,
how can I unbind a key? please excuse my ignorance but I did try searching for this on the forum but stopped after the sixth page
sztanpet
 
Posts: 3
Joined: Fri May 28, 2010 3:58 pm

Re: 20100527 Beta

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

@sztanpet: I'll remove that key binding for the next beta, but in the mean time you can remove it by editing Preferences/Default Key Bindings, and removing the line with invertSelection
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 28 guests