Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Align to tab columns doesnt work when you convert tabs to spaces
Align to tab columns doesnt work when you convert tabs to spaces [message #810575] Thu, 01 March 2012 09:15 Go to next message
Derek Wallace is currently offline Derek WallaceFriend
Messages: 5
Registered: March 2012
Junior Member
Hi,
This is how many other editors work.
0. set tab size to 3 chars.
1. setup to convert tabs to spaces
2. Hitting Tab will jump to the tab column (and then replace tab with required spaces)
So if a tab is 3 chars then hitting tab will always bring you to to column 4,7,10,13 etc., This makes it easy to align text.
If im on column 1 and i hit tab i jump to column 4 and 3 spaces inserted
if im on column 2 and i hit tab i jump to column 4 and 2 spaces inserted

With this setup its easy to convert

$sVar = "0";
$sVarLongName = "1";

to

$sVar = "0";
$sVarLongName = "1";

Put cursor at "=" and hit tab a few times.


With eclipse the behaviour is different.
0. set tab size to 3 chars.
1. setup to convert tabs to spaces
2. Hitting tab will ALWAYS insert 3 spaces. There is NO alignment to tab columns.

In Eclipse the above is painful. You end up having to insert spaces to do it.


Any ideas if there is a plugin that can help?

Thx
Derek


Re: Align to tab columns doesnt work when you convert tabs to spaces [message #811113 is a reply to message #810575] Fri, 02 March 2012 00:02 Go to previous messageGo to next message
Toshihiro Izumi is currently offline Toshihiro IzumiFriend
Messages: 356
Registered: July 2009
Location: Japan
Senior Member
FYI:
Bug 336647 - Insert Spaces for Tabs / Tab Policy constantly inserts the configured number of spaces

Here is a generic plugin to support "Insert Spaces for Tabs" but have some restrictions.
http://sourceforge.jp/users/atlanto/pf/eclipse/files/?id=449
pdt_tools.tabHandler_1.2.1.zip
This is not for pdt, so it respects Preferences>General>Editors>Text Editors>Insert spaces for tabs(and Displayed tab width). Also this plugin breaks Preferences>PHP>Editor>Typing>Tab key indents the current line.
See pdt_tools.tabHandler.txt, though it's in Japanese...

Here is a feature patch for pdt 3.0.0.v20110516.(not the latest version)
http://sourceforge.jp/users/atlanto/pf/eclipse/files/?id=435
pdt_tools.feature_patch.pdt.3.0.0.v20120221.zip
See pdt_tools.feature_patch.pdt.html, though it's in Japanese...

--
atlanto
http://blog.goo.ne.jp/atlanto/
Re: Align to tab columns doesnt work when you convert tabs to spaces [message #813067 is a reply to message #811113] Sun, 04 March 2012 20:04 Go to previous messageGo to next message
Derek Wallace is currently offline Derek WallaceFriend
Messages: 5
Registered: March 2012
Junior Member
Installed this and it seems to have done the trick.



sourceforge.jp/downloads/users/0/477/pdt_tools.tabHandler_1.2.1.zip/



Re: Align to tab columns doesnt work when you convert tabs to spaces [message #938915 is a reply to message #813067] Wed, 10 October 2012 09:17 Go to previous messageGo to next message
Dylan Cromwell is currently offline Dylan CromwellFriend
Messages: 2
Registered: October 2012
Junior Member
Hey Derek, can you provide any guidance on how to install this tabHandler extension you've linked to?

My current installation is of the Zend Eclipse PDT 64 bit version (packaged as an all-in-one download) on Ubuntu Linux.

Any help would be much appreciated!
Re: Align to tab columns doesnt work when you convert tabs to spaces [message #938945 is a reply to message #938915] Wed, 10 October 2012 09:44 Go to previous message
Dylan Cromwell is currently offline Dylan CromwellFriend
Messages: 2
Registered: October 2012
Junior Member
Ah please ignore my last comment. I found what I needed in this file and it works like a charm!

osdn.dl.sourceforge.jp/users/0/476/pdt_tools.tabHandler.txt
Previous Topic:Zend debugger in Eclipse on OS X 10.7
Next Topic:what repository for RSE User actions?
Goto Forum:
  


Current Time: Fri Nov 28 09:01:36 GMT 2014

Powered by FUDForum. Page generated in 0.03446 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software