Home Download Buy Blog Forum Support

[ST3] Transpose words is broken

[ST3] Transpose words is broken

Postby bizoo on Tue Jun 25, 2013 3:39 pm

in ST2, Transpose command works with words.
In ST3, it doesn't works anymore because of the added parameter with a default value False:
Code: Select all
def transpose_selections(edit, view, can_transpose_words = False):
bizoo
 
Posts: 886
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: [ST3] Transpose words is broken

Postby bizoo on Mon Oct 07, 2013 3:41 pm

As I've had no answer if it's by design or a bug, maybe it is not enough detailed.
With this line of code:
Code: Select all
me.fireEvent('disable',this);

if I put my caret right before the "this" and hit "Transpose" keybinding results:
In ST2:
Code: Select all
me.fireEvent(this,'disable');

In ST3:
Code: Select all
me.fireEvent('disable't,his);


The ST2 behavior is very handy, the ST3 not too much.

startup, version: 3053 windows x64 channel: dev
bizoo
 
Posts: 886
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: [ST3] Transpose words is broken

Postby Asotos on Sat Jan 11, 2014 2:43 pm

Yep, I can confirm this, too (Sublime Text 3, Build 3059)...

The Default Key Bindings in Windows offer no guidance either. Maybe a Boolean option there would be a good idea...
Asotos
 
Posts: 1
Joined: Sat Jan 11, 2014 2:29 pm

Re: [ST3] Transpose words is broken

Postby bizoo on Mon Jan 13, 2014 8:29 am

Asotos wrote:Yep, I can confirm this, too (Sublime Text 3, Build 3059)...

The Default Key Bindings in Windows offer no guidance either. Maybe a Boolean option there would be a good idea...

Don't expect any fix soon, this bug report (and all others I've reported) was totally ignored.

Fortunately, you can fix it yourself by copying the file "transpose.py" from the Default package (this is for Windows, it's a zip file):
Code: Select all
C:\Program Files\Sublime Text 3\Packages\Default.sublime-package

to your user folder:
Code: Select all
\Packages\User\transpose.py

and change the default value of "can_transpose_words" argument to True:
Code: Select all
def transpose_selections(edit, view, can_transpose_words = True):

The drawback is that you override the standard source file and you have to check when ST is updated if this source is modified.
bizoo
 
Posts: 886
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland


Return to Technical Support

Who is online

Users browsing this forum: Juje007 and 35 guests