我在gnome终端内使用vim编辑Python程序。我还使用平铺窗口管理器调用awesome-wm。
在我的Python程序中,我将一些数据绘制到matplotlib图上(执行后会打开另一个窗口)。当我想测试我的程序时,我使用以下命令从vim内部运行该程序。
:!python3 %
当程序运行时,它会向外壳打印三个消息,并打开matplotlib窗口以绘制数据。
有时我只能看到混乱的换行符,并且不得不向上滚动才能看到消息。我现在的问题是,为什么控制台内部的格式混乱了,我该如何解决?
My guess would be that the Terminal Window does not notice that it is beeing resized when the plot window is beeing opend, but i dont know how to refresh the terminal in that case. using :!clear; python3 %
does not help.
Thanks in advance.
(Well, it isn't a direct solution to your problem, but here it goes.)
Most terminal don't handle reflow in resize properly. There is no right ways to do it so most don't attempt to pull all the tricks in the book to make this better. After all, for classic floating window manger, resizing isn't something you do very often. LibVTE/Gnome-terminal isn't designed for tiling WMs and has not been patched over the years to make it better.
Urxvt
可能是AwesomeWM的最常见终端(默认是xterm
因为默认情况下更常见)。它具有更高级的功能,例如您希望现代终端提供的选项卡和透明度。请注意,其中的某些(选项卡)默认情况下处于禁用状态。
有时使用像这样的软件tmux
可以减轻任何给定终端的某些限制,但是它具有其自身的限制。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句