Due to several issues I’ve been having with emacs, I’ve decided to restart anew with a blank set of configurations and only add ones I need. This should allow me to much more easily debug problems I’m having with my configurations, without the 40 megabytes of so of packages that I’d accumulated, many of which had my own customizations. Anything I add to my new .emacs file, I’m going to write about here in order to make sure that it is justafiable.
The first things I added were the following set:
(setq ido-enable-flex-matching t) (ido-mode t) (ido-everywhere t) (setq ido-max-prospects 0) (setq backup-directory-alist '(("." . "~/.emacs-d/.emacs-backups"))) (setq version-control t) (setq delete-old-versions 1) (setq kept-new-versions 1000) (setq kept-old-versions 1000) (setq backup-by-copying t) (add-hook 'before-save-hook '(lambda () (setq buffer-backed-up nil))) (toggle-truncate-lines 1) (setq-default truncate-lines t) (setq-default truncate-partial-width-windows t)
The first set of customizations deals with ido, a package that vastly enhances the minibuffer. I find it incredibly useful, to the point where using the minibuffer to find files is somewhat irritating without it. Ido will display all the options for finding a file, keeping tab completing as well as just being able to hit enter to autocomplete. If you need to drop back into the regular find-file, it’s just C-f while in ido-mode. The first line enables ‘fuzzy’ matching in ido, where you can just enter some of the letters in a filename to complete it. For example, to match the file orbit_vm_jit.c, you could just type ‘ojit’ and as you type the list of possible options will narow. The next two commands will activate ido-mode and make everytihng use it. The last line will mave ido show every possible completion - I hate it when the list is truncated by ‘…’.
The next set of customizations deal with my backup policy. I hate having backup files scattered around, so the first line consolidates them into one location. I prefered numbered backups so I can keep multiple versions of files - Specifically, the first and last thousand. While this is probably overkill, I do have to keep a larg amount of backups, since I add a hook that occurs before save that causes a backup to be created every time I save. Since I, like any good software developer, save compulsively, I often have several hundred backuops.
The last three lines deal with truncation of lines. I personally hate lines when lines overflow onto the next line - I much prefer them to just be cut off. Those lines enable this to happen in every situation I come in.
While I did start anew to avoid unnecesary complexity, I am always looking for new emacs customizations to enhance my editing - if you have any you think I should add, please mention them in the comments.