How to replace all tab characters in a file by sequences of white-spaces in intellij?

社会主义新天地 提交于 2019-12-03 04:54:19

问题


Given a file in my project, I want to be able to replace all of the tab characters in the file with white spaces. Is there any way to do this in intellij?


回答1:


Go to Edit | Convert Indents , and then choose To Spaces or To Tabs respectively. It's in the documentation: Changing identation




回答2:


Replace only tabs used for indentation

  • Ctrl + Shift + A
  • type "To Spaces" > Enter

Replace all tabs

  • Ctrl + R
  • check Regex
  • Enter \t and spaces
  • Replace all



来源:https://stackoverflow.com/questions/25816516/how-to-replace-all-tab-characters-in-a-file-by-sequences-of-white-spaces-in-inte

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!