No Space Please, Only Tabs for Indentation
来源:互联网 发布:unity3d 地形材质 编辑:程序博客网 时间:2024/06/05 21:16
Generally, most of code editors provide two options for indentation: space and tab. And I don't quite understand under what condition one should use spaces for indentation purpose instead of tabs; to me, that just makes your code less readable, nothing else.
Visual Studio:
You might need to visualize the space symbols before you can do anything to them:
To make VS apply tabs for indent automatically when you press 'Enter' key, you need to go Tools->Options:
In the dialog brought up, select Text Editor->C#->Tabs, and there you go. You can also specify other configuration of how the text editor perform the indentation, like 'Tab size', which indicates how many spaces' width should a tab occupy.
But what about the spaces that left behind by your stupid predecessor? Most of the text editors coming with IDEs provide a tool to convert indent from space to tab and vice versa, however, you need to highlight the lines before proceeding:
WebStorm:
Go to File->Settings: Expand 'Code Style', Select the language, tick 'Use tab character'
To convert indents:
To view the space symbols: go to View->Active Editor->Show Whitespaces
Notepad++:
SubLime 2
This editor has a wonderful function, which is to convert all the leading spaces in the opening file as indent to tabs:
NetBeans 8.0
Tab Setting:
Install themes:
- No Space Please, Only Tabs for Indentation
- Fix Indentation and Tabs in VIM (Vim格式化操作)
- python inconsistent use of tabs and spaces in indentation
- inconsistent use of tabs and spaces in indentation
- TabError: Inconsistent use of tabs and spaces in indentation
- SyntaxError: inconsistent use of tabs and spaces in indentation
- python TabError: Inconsistent use of tabs and spaces in indentation
- taberror inconsistent use of tabs and spaces in indentation pycharm
- python inconsistent use of tabs and spaces in indentation
- iPhone Tabs for Android!
- checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with
- checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with
- ORA-01950: no privileges on tablespace ,ORA-01536: space quota exceeded for table space 'CYYD'
- No English, Chinese please
- [FFC]no-repeats-please
- JS:No Repeats Please
- No repeats please
- Jade报错:Invalid indentation,you can use tabs or spaces but not both问题
- openmp的一些示例代码
- 使用Texture管理cocosBuilder项目资源:纹理文件使用(TexturePacker)
- Web Service 那点事儿 —— 使用 CXF 开发 SOAP 服务
- 11g rac terminating the instance due to error 481 节点驱逐
- 从零开始开发应用 客户端篇(一)
- No Space Please, Only Tabs for Indentation
- 在Spring、Hibernate中使用Ehcache缓存
- HDU 题目1051 Wooden Sticks
- c++版链表实现
- python实现贝叶斯分类器
- 动态链接库与静态链接库的区别
- .......
- ComputeLoanUsingInputDialog ( 使用输入对话框)
- Topic Model 相关论文