Android Studio 禁用换行
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20882044/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android Studio disable line wrap
提问by joseRo
I have this strange line wrap on Android Studio and I want to disable because it freaks me out...
我在 Android Studio 上有这个奇怪的换行符,我想禁用它,因为它吓坏了我......
回答by mes
It's also available under the context menu
它也可以在上下文菜单下使用
回答by ozbek
In Android Studio 0.4.0 following should help:
在 Android Studio 0.4.0 以下应该有所帮助:
Configure > Settings > Editor > Uncheck 'Use soft wraps in editor'
On Mac (Android Studio 3.0):
在 Mac(Android Studio 3.0)上:
Preferences -> Editor -> General -> Uncheck 'Use soft wraps in editor'
回答by Attacktive
I wanted to entirelydisable wrapping and I found a workaround.
我想完全禁用包装,我找到了一个解决方法。
It doesn't seem to work for specific file extensions (Groovy, HTML, Java, etc.) but does with the general value. I set it with a significantly great number and am having no more wrapping.
它似乎不适用于特定的文件扩展名(Groovy、HTML、Java 等),但适用于一般值。我设置了一个非常大的数字并且没有更多的包装。
I think they should give a master option for it!
我认为他们应该给它一个主选项!
回答by Ratul
In Android Studio 1.0.2, there is no menu named Configure. Settingsis now under Filemenu. Everything are as accepted answer.
在 Android Studio 1.0.2 中,没有名为Configure 的菜单。设置现在位于文件菜单下。一切都是公认的答案。
回答by mrfilter
回答by Sethuraman Srinivasan
回答by Brian Mc
In Android Studio 3.5.3 you can set the soft wrap to line up with the orginal lines indentAND set an additional indent spaces. Makes it easier for me to read Settings --> Editor --> General
在 Android Studio 3.5.3 中,您可以将软换行设置为与原始行缩进对齐并设置额外的缩进空格。让我更容易阅读设置 --> 编辑器 --> 常规
回答by Rodrirokr
I found helpful that in the current version (Android Studio 3.2) you can set the soft wrapindicators to show only in the current line in adition to using soft wraps in editor.
我发现在当前版本 (Android Studio 3.2)中,除了在编辑器中使用软包装外,您还可以将软包装指示器设置为仅显示在当前行中。
Check the Show soft wrap indicators for current line onlyin:
选中仅在以下位置显示当前行的软换行指示器:
Editor -> General -> Soft Wraps
Editor -> General -> Soft Wraps
回答by Chris Paveglio
There is also the auto-line breaking issue, where AS will automatically add hard line returns in long lines. I found the setting for this in Preferences > Editor > Code Style > Hard wrap at [X] and []wrap on typing.
还有自动换行问题,AS 会自动在长行中添加硬线回车。我在 Preferences > Editor > Code Style > Hard wrap at [X] 和 []wrap on typing 中找到了这个设置。