Home Download Buy Blog Forum Support

Is there a command like Textmate's Text > Move Column Left?

Is there a command like Textmate's Text > Move Column Left?

Postby natecavanaugh on Fri Sep 09, 2011 6:53 am

Hi there,
Is there a command like Textmate's Text > Move Column Left or Move Column Right?
Essentially, the functionality I'm looking for is to just have a selection highlighted and pressing CMD+CTRL+Left or Right (or Up or Down) and having the selected characters move in the direction of the arrow.

Is this doable out of the box or with a plugin? And if with a plugin, is there any hints on which API calls I should access?

Thanks in advance,
natecavanaugh
 
Posts: 13
Joined: Fri Sep 09, 2011 6:50 am

Re: Is there a command like Textmate's Text > Move Column Left?

Postby natecavanaugh on Fri Sep 09, 2011 2:28 pm

Hi there,
Thanks for the response :)
In TM, it will move the current characters, but offset any existing characters.

So if I have the string "Hello world, my name is Foo Bar" and I select 'B' and ctrl+cmd+right, then Bar will look like aBr. If I select 'my name i' and ctrl+cmd+left 3 times, the whole sentence would look like:
"Hello worlmy name id, s Foo Bar".

I never realized quite how often I use this day to day since trying the conversion from TM to Sublime, so I wasn't sure if there's a way to get the functionality.

You mentioned the command history api and z-indexes? Is this documented anywhere or is it so new? (Of course, I'll be googling as soon as I press Submit, so I appreciate the mention).
Also, do you know if there are any examples around using a similar technique that I could look at?

Thanks again,
natecavanaugh
 
Posts: 13
Joined: Fri Sep 09, 2011 6:50 am

Re: Is there a command like Textmate's Text > Move Column Left?

Postby kuroir on Sat Sep 10, 2011 11:56 am

Good implementation sublimator, I just saw that and it's AWESOME!
kuroir
 
Posts: 71
Joined: Thu Sep 01, 2011 11:28 pm
Location: Mexico

Re: Is there a command like Textmate's Text > Move Column Left?

Postby natecavanaugh on Wed Sep 21, 2011 1:59 am

Wow! This is amazing. Thanks so much for writing this up. Sorry about the delay in the response to it (I was on vacation w/o internet for the past 10 days), but seriously, thank you so much. This is really awesome :)
natecavanaugh
 
Posts: 13
Joined: Fri Sep 09, 2011 6:50 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 30 guests