Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 228
Nabil Sham Avatar asked Feb 13 '14 06:02

Nabil Sham


2 Answers

This will reload the .Xresources:

xrdb ~/.Xresources 

Source: Arch wiki

like image 92
doc1623 Avatar answered Sep 18 '22 16:09

doc1623


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)

like image 21
Thomas Dickey Avatar answered Sep 18 '22 16:09

Thomas Dickey