# anonymous: 20 Nov 2007
The xterm alias in your .bashrc seems (at least mostly) unnecessary.
You can instead use ~/.Xdefaults to set resources for xterm (or any
well-behaved terminal). Thus the settings also take effect if xterm
launched by a program other than bash. For example, background and
foreground colors can be set with
xterm*background: black
xterm*foreground: gray
Or if you want any program that uses X resources to have these color settings
*background: black
*foreground: gray
I believe the following should work for any well-behaved terminal (and
only terminals)
*.vt100.background: black
*.vt100.foreground: gray

These settings will take effect after an X restart or for any xterm
launched after
xrdb ~/.Xdefaults
# Hugh O'Brien: 22 Apr 2013
I was fighting less for hours, never thought of paging with vim. Thank you!
# anonymous bastard: 08 Jul 2015
Thanks for the ideas!
I suggest you the following updates:

hex() { printf '0x%x ' "$@"; echo; }
chr() { printf "$(printf '\\%03o' "$@")\n"; }
ord() {
printf '%s' "$@" | sed -r 's/./&\n/g' | while IFS= read -r c
do printf '%d ' "'$c"
done
echo
}
ordx() { hex $(ord "$@"); }
# Pádraig Brady: 08 Jul 2015
Nice. So you adjusted them to support strings rather than single chars. At first glance I can't improve on your implementation. I'll have a look at incorporating them. thanks!
Name:
Website:
comments:
(no HTML)
31+9