Terminal
如何禁用終端調整大小
Vim
腳本有時會調整整個外殼的大小(在我的情況下是Taglist
外掛)。我不想要這種行為,這也可以通過 shell command 來實現
resize
。有沒有辦法抑制外殼視窗中的整個調整大小?有什麼
.*rc
要調的文件嗎?我正在使用 gnome 終端。
要修復 Taglist 問題,請在 .vimrc 中的某處添加以下內容:
let Tlist_Inc_Winwidth=0
來自 VIM 文件:
Window resizing with xterm only works if the allowWindowOps resource is enabled. On some systems and versions of xterm it's disabled by default because someone thought it would be a security issue. It's not clear if this is actually the case. To overrule the default, put this line in your ~/.Xdefaults or ~/.Xresources: XTerm*allowWindowOps: true (note: this actually ENABLES it, you want to DISABLE, ie: false) And run "xrdb -merge .Xresources" to make it effective. You can check the value with the context menu (right mouse button while CTRL key is pressed), there should be a tick at allow-window-ops.
根據我自己對 Xresources 的經驗,如果你去掉“XTerm”部分,只用星號開頭,它也應該適用於任何 gnome 終端。gnome 終端有它的特定前綴,但我不知道,也許有人可以評論該資訊,但*allowWindowOps: false行應該會有所幫助。