Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Tabs in files(Java editor)
Tabs in files [message #1819552] Fri, 17 January 2020 09:05 Go to next message
joseph newcomer is currently offline joseph newcomerFriend
Messages: 4
Registered: July 2017
Junior Member
I have searched throughout the menus and preferences searching for a way to make sure a tab character is not once, not ever, inserted into a source file I am editing. The TAB key is used to do indentation, but I want to see spaces, and ONLY spaces, in any whitespace in the source. Putting a TAB character (0x09 or \u0009) into a source file is a very evil thing to do, since it makes looking at that file impossible in editors that use different values for tab spacing, or printing utilities, or pretty much anything other than one unique editor. I would like to have an option to automatically "untabify" any source file I edit, but lacking that, an "untabify" command would do. Am I missing something obvious here?

[Please do not waste my time or yours telling me that the use of TAB characters makes my files smaller, or faster to parse. I have storage measured in Gigabytes in the cloud and Terabytes on my machine, and it would take a massive effort and extremely high-precision timers to tell the difference in speed between compiling programs that use TAB characters and those that use spaces]

[And yes, I am a Newcomer, in name, as well as in using Eclipse]
Joseph M. Newcomer, Ph.D. (ret)
Re: Tabs in files [message #1819557 is a reply to message #1819552] Fri, 17 January 2020 10:07 Go to previous message
Emmanuel Chebbi is currently offline Emmanuel ChebbiFriend
Messages: 66
Registered: February 2018
Member
The following links explain how to insert spaces when hitting the TAB key:

To replace existing tabs you can then format your code (Ctrl + Shift + F) or use Eclipse's search and replace dialog:

  • Ctrl + H > File Search tab
  • Check "Regular expression" and type "\t" in the Search string field
  • Click Replace...
  • Type " " (times the number of spaces you want) in the dialog that opens when the search ends
  • OK
Previous Topic:Configure Eclipse with SAP Cloud Platform Tools for Java
Next Topic:Blank window in IDE: how to get rid of it
Goto Forum:
  


Current Time: Fri Feb 21 07:37:24 GMT 2020

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

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

Back to the top