如何在 Android Studio 中自动删除尾随空格? [英] How do I auto-remove trailing whitespace in Android Studio?

查看:59
本文介绍了如何在 Android Studio 中自动删除尾随空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

类似于)

Similar to the question for eclipse,

  • How can I auto-remove trailing whitespace from the entire file being edited?
  • How can I auto-remove trailing whitespace only from the lines I changed?

解决方案

You can also enable it on save via the following preference (Editor -> General -> Other):

And for those wondering,

"Always keep trailing spaces on caret line"

If this option is selected, trailing spaces will not be stripped on the line where the caret is placed on save operation (for example, when you switch to another window).

(bigger image)

这篇关于如何在 Android Studio 中自动删除尾随空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆