Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
542 views
in Technique[技术] by (71.8m points)

bash - Reload .Xresources without restarting the xterm

To use ALT key in vim without tweaking, the escaping should be disabled in xterm. Without escaping the ALT will not work in bash for shortcuts.

to work around I need to reload this option before starting vim:

XTerm*metaSendsEscape: false | xrdb -load 

Any idea how I can reload .Xresource and make changes take effect without restarting the terminal window ?
Open to other terminal to have ALT work both in vim and bash.

question from:https://stackoverflow.com/questions/21746654/reload-xresources-without-restarting-the-xterm

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

xterm will not reread resources just because you run xrdb. X applications only read resources when they are initializing.

Besides the menu entry (added in patch #122, 1999), one could use two other ways to change the metaSendsEscape resource:

  • escape sequence, documented in XTerm Control Sequences

    CSI ? Pm h DEC Private Mode Set (DECSET). ... Ps = 1 0 3 6 -> Send ESC when Meta modifies a key. (This enables the metaSendsEscape resource).

  • editres (but very cumbersome due to the large number of resources)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...