How to turn off word wrap in iTerm2?

六眼飞鱼酱① 提交于 2019-12-20 08:36:56

问题


How to turn off word wrap in iTerm2? Is there a specific command to do so or in the preferences? I am trying to avoid having the text run down to the next line. I would rather scroll side to side.


回答1:


lifted directly from https://apple.stackexchange.com/a/210666/115119

Props to @michid

Disable line wrapping:

tput rmam

Enable line wrapping:

tput smam



回答2:


It appears that iTerm2 does not have the ability to turn off word wrap. There is an open issue (iTerm2 issue #1790) reported to "Provide toggle to turn on/off line wrapping".

The description of that issue reads:

Looks like a conversation was had in the Google Groups about this but no one ever actually filed a feature request.

http://groups.google.com/group/iterm2-discuss/browse_thread/thread/e0f4e9b552d8acd4

In general I don't like having horizontal scrollbars and prefer to have the lines wrap, but there are occasions...such as looking at long stack traces, that I'd rather just have sequentially indented lines line up and just be forced to scroll to the right to expose all the details. To accomplish this task now, I end up making the text incredibly small so I can read stack traces lined up, but even that doesn't always work.

In October, 2014, the creator of iTerm2 commented regarding the feature request to toggle word wrap, "I'd like to do this but it's a lot of work, so feel free to send a pull request, but don't be [a jerk]."

In April, 2015, the milestone for the feature request was changed to "Future Release".



来源:https://stackoverflow.com/questions/28954083/how-to-turn-off-word-wrap-in-iterm2

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