20 June 2011
Random Linux tips
Playing with Arch Linux, I was forced to learn a thing or two about terminals. For example, I've often seen that silly annoyance where VI would start typing A, B etc when using arrow keys in insert mode; apparently it's due to a mismatch between what VI thinks the $TERM type should send and what actually gets there.
In my case, I had to add the following option in my .vimrc:
set term=builtin_xterm
Also: xterms colors and options go in a .Xresources file, which must be loaded at some point with "xrdb -merge .Xresources"
Meanwhile, emacs was taking ages to start up. Turns out it's doing some funky things with hostnames, you can use strace to see where it gets stuck polling for what emacs thinks is the machine name, and make sure that name can be resolved quickly (e.g. fix your /etc/hosts).
Who knew grep can use colours? grep --color=auto (note: the "auto" scheme assumes a dark background for the terminal).
And who knew there was such a thing as colordiff?
No comments:
Post a Comment