5 android intellij-idea code-editor android-studio
在 Android Studio 中,我想设置代码编辑器,这样我就可以用键盘箭头移动光标,或者用鼠标单击空白行上的某处,光标将放置在上一行代码开头的正下方。
据我了解,该选项keep indents on empty lines应该激活这种行为,但不幸的是,在设置后,我仍然无法实现我不会实现的目标。如果光标移动到空行,它总是在行首。尝试重新启动 Android Studio,没有帮助。
谷歌了很多没有找到任何信息。
如果有人知道如何获得这种行为,将非常感谢帮助。
There's an issue in Intellij-Idea very similar to this one that might apply here.
https://youtrack.jetbrains.com/issue/IDEA-144196
The workaround I found was to set the 'Strip trailing spaces on save' option in Settings > Editor > General to 'None'. This works in addition to enabling options in your code style settings that keep the indent on empty lines. From what I can surmise, it seems like the logic that applies the rule to indent conflicts or has some sort of order of operations rule issue with the option to strip trailing spaces.
It's not a perfect workaround... by doing this, you get to keep your tabs on empty lines, but it comes at the cost of also retaining any empty spaces at the end of lines.
我不确定他们是否已经为 Idea 15 版本修复了这个问题,但如果问题的状态是任何指标,我打赌没有。可能有比这更好的解决方法。这只是我尝试过的一种产生可接受结果的方法。
| 归档时间: |
|
| 查看次数: |
2592 次 |
| 最近记录: |