Android Studio 中的垂直线 [英] Vertical Line in Android Studio

查看:53
本文介绍了Android Studio 中的垂直线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道为什么,但有时在 Android Studio 编辑器中,它显示垂直线,如下面的屏幕截图所示.

不知道其他编辑器,但它发生在 Android Studio 中.

<块引用>

那么它为什么显示以及如何隐藏它?

解决方案

那条线在历史上代表 A4 纸的边距,只有在需要打印代码时才有用.老派说你应该把你的代码保持在那个范围内,以保证更多的可移植性.

但是……现在在现实生活中,这对我来说毫无意义!因为我们总是使用高级编辑器、更大的显示器,而且我从不需要打印任何一行代码.

所以,如果你想这样做:

较新的版本

<块引用>

编辑器 ->一般 ->外观 ->显示硬包装指南

旧版本

<块引用>

编辑器 ->一般 ->外观 ->显示右边距

<块引用>

编辑器 ->外观 ->显示右边距

对于 Mac

<块引用>

要删除行,请转到:-首选项->编辑器->一般 ->外观 ->显示硬包装和视觉指南.取消选中它以删除.

I don't know why but sometime in Android Studio Editor, it shows vertical line as shown in screenshot below.

Don't know about other editor but it happens in Android Studio.

So why it is showing and how to hide it?

解决方案

That line historically represents the margin of A4 paper, which is useful only if you need to print the code. Old school says that you should keep your code inside that margin, to guarantee much portability.

But.. nowadays in the real life, it makes no sense to me! Because we always use advanced editors, bigger displays, and I never needed to print any single line of code.

So, if you want to do it:

Newer versions

Editor -> General -> Appearance -> Show hard wrap guide

Older versions

Editor -> General -> Appearance -> Show right margin

or

Editor -> Appearance -> Show right margin

For Mac

To remove line go to:- Preference-> Editor -> General -> Appearance -> Show hard wrap and visual guides. Uncheck it to remove.

这篇关于Android Studio 中的垂直线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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