My environment and tools

Terminal

On MacOS X, I use the standard Terminal program. On Cygwin, I use mintty (now the default), it has native Windows font rendering and looks nice.

Font

I recommend DejaVu – it covers a large amount of Unicode character set and is rather pretty.

Colours

I use black on white (light-grey, actually). I don’t syntax-highlight text, because this distracts me. Everything that exists on the screen should have meaning. When you have some words in blue and some in green, that should mean different things, so it adds a layer of functional semantics on top of the text semantics. Sometimes it’s appropriate — like when appearance of a link in a web page is different from appearance of a simple text. But in the source code you already have that semantics defined by the language, so why duplicate it? Of course that’s not obvious when you’ve used an IDE through all of your career.

Keyboard typing scheme

By saying “typing scheme” I mean how you type “chords” which are a combination of multiple keys pressed together.

There’s a scheme which I find easy, convenient and universal: press all modifiers by one hand and the actual character by another.

C-M-n is typed like this: Control-Alt by the left hand, n by the right. M-% is typed like this: Alt-Shift by the right hand, 5 by the left. When the target character is in the left half of the keyboard, press modifiers on the right, and vice versa. This approach also reduces the harm which repetitive strain does to your hands (press C-t by the left hand to understand what I mean).

If you look at the design of the “Space Cadet” keyboard (the Wikipedia says it influenced the design of Emacs), you won’t be surprised: the modifier keys are grouped together. By the way, it had seven modifier keys! Of which, “hyper” and “super” still can be used in Emacs — you can assign them to some keys and bind commands as usual.

Switching buffers

There’s a basic, but frequently overlooked feature in minibuffer called “future history”. This is suggestions which M-n skips through while in minibuffer. Its contents are the same as C-x C-b shows. And it’s incrementally-searchable via C-s! So you type C-x b, C-s, then some part of the buffer name – and skip through matching names with C-s until you see the desired buffer name.

Recursive dired

If you have many files in many directories in a (sub-)project (which is common for Java projects), you can use C-u s to add ‘-R’ ls option. With ‘dired-isearch-filenames’ set to ‘t’, you can then isearch files by name conveniently.

Info manuals

To switch between info manuals more convenient, assign for yourself numbers for frequently-used manuals, remember them and use prefix argument for C-h i. Like, M-2 C-h i will always open elisp manual, M-3 C-h i – manual for cc-mode etc. Bind ‘info-display-manual’ on some convenient key; with C-u it limit offered manuals to already opened.

Cygwin

On Windows, I use Cygwin. It is basically a Windows DLL offering an implementation of POSIX system functions, so it allows to compile for Windows a program that’s written for GNU/Linux or other *nixes. If offers many pre-compiled packages including Bash and Emacs.

There was a long-standing Cygwin problem with loading when multiple DLLs collided in memory, but it was fixed some years ago by introducing an internal table of addresses and there are no serious problems now. There’s a special program call rebase (and rebaseall variant) which fixes the DLLs, it is usually run automatically after Cygwin setup. You have to know this in case you’re building something yourself. Read the Cygwin user guide for more information.

There’s a special option for people using Cygwin on Windows — a separate package called emacs-w32. It is a version of Emacs which uses native Windows GUI. That’s important because you get font anti-aliasing and rendering as in mintty.

This entry was posted in emacs. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *