parsed.org

Tips by tag: terminal

Audible Bell by xinu on Jan 12, 2005 10:13 AM

To switch back and forth between the audible bell and the visual bell, run the following:

C-a C-g
bellkeystrokesscreenscreenrcterminal
Colorize python source in a terminal by cygnus on Jan 12, 2005 10:10 AM

Use the pycolor tool included with ipython. It will format the source using ASCII codes so it looks pretty in your terminal:

$ pycolor foo.py
asciicommandsipythonlanguagesprogrammingpycolorpythonterminal
FIFOs Are Great by xinu on Jan 12, 2005 10:52 AM

If you want to tail the errors on another terminal, just push them to a fifo:

$ mkfifo pgerror
$ psql -U user dbname < ./dbfile 2> pgerror

On your other terminal:

$ tail -f pgerror

Voila! STDOUT on the main terminal, and STDERR on the secondary.

commandserrorsmkfifopipepsqlredirectshelltailterminal
Fixing the Backspace Key by cygnus on Nov 14, 2005 11:14 AM

On some systems (and for some terminal types), Emacs' use of the backspace key can be confusing. The backspace key may behave like the Delete key. You can fix this either by using this elisp in your ~/.emacs as follows:

(keyboard-translate ?\C-h ?\C-?)

This shell command may work if the elisp does not:

stty erase '^?'
backspacecrapdeletedot-emacseditorsemacsgotchakeystrokesterminal
Multi-user screen sessions by cygnus on Jan 12, 2005 10:00 AM

In a running screen, run:

C-a : multiuser on
C-a : acladd $user

Then run:

screen -x [pid]

to connect to (and control) the mulituser screen from another terminal.

keystrokesmulti-userscreensessionsterminal

Use split to move blocks of text around rather than having multiple terminals open. Open the file you want using the split command:

split: path/to/file

C-w and then k or j will move you between vertically between the buffers when you are not in insert mode (up and down, respectively). For example, this makes moving text between files much easier.

buffercommandeditorssplitterminaltextwindow
RSS