change Eclipse to use spaces instead of tabs?
2020-05-10 16:00:29来源:博客园 阅读 ()
change Eclipse to use spaces instead of tabs?
Java Editor
- Click Window » Preferences
- Expand Java » Code Style
- Click Formatter
- Click the Edit button
- Click the Indentation tab
- Under General Settings, set Tab policy to:
Spaces only
- Click OK ad nauseam to apply the changes.
[Note: If necessary save profile with a new name as the default profile cannot be overwritten.]
Default Text Editor
Before version 3.6:
Window->Preferences->Editors->Text Editors->Insert spaces for tabs
Version 3.6 and later:
- Click Window » Preferences
- Expand General » Editors
- Click Text Editors
- Check Insert spaces for tabs
- Click OK ad nauseam to apply the changes.
Note that the default text editor is used as the basis for many non-Java editors in Eclipse. It's astonishing that this setting wasn't available until 3.3.
C / C++
- Click Window » Preferences
- Expand C/C++ » Code Style
- Click Formatter
- Click the New button to create a new profile, then OK to continue
- Click the Indentation tab
- Under General Settings, set Tab policy to:
Spaces only
- Click OK ad nauseam to apply the changes.
HTML
- Click Window » Preferences
- Expand Web » HTML Files
- Click Editor
- Under Formatting, select the Indent using spaces radio button
- Click OK to apply the changes.
CSS
Follow the same instructions for HTML, but select CSS Files instead of HTML Files.
JSP
By default, JSP files follow the formatting preferences for HTML Files.
XML
XML files spacing is configured in Preferences.
- Click Window » Preferences
- Expand XML » XML Files
- Click Editor
- Select Indent using spaces
- You can specify the Indentation size if needed: number of spaces to inde
原文链接:https://www.cnblogs.com/kungfupanda/p/12861795.html
如有疑问请与原作者联系
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- eclipse下创建Maven项目(包含webapp目录结构) 2020-06-09
- Caused by: java.sql.SQLSyntaxErrorException: Unknown col 2020-06-07
- Eclipse中常用快捷键的使用 2020-06-01
- Eclipse安装Lombok插件 2020-05-24
- Eclipse中配置Maven 技巧 2020-05-22
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash