Probably requires a recent version of Emacs.
Put this in your
(add-to-list 'load-path "/path/to/emacs-conf/") (load "top")
General editing (top.el)
C-zso that it can be used as a prefix elsewhere.
- Disables the menu bar, scroll bar, and toolbar.
C-x C-mas an alternative to
- Change various settings to encourage commands that want to show a buffer to avoid splitting an existing window or opening a new frame.
C-wto do the same thing as
C-x C-kto call
C-zlto toggle whether lines are truncated in the current buffer.
- Set shell colors (for use with the
- Set a small 7x13 pixel font.
- Enable the commands downcase-region, upcase-region, and narrow-to-region.
M-mto kill the entire current line (similar to
C-ato either go to the first non-whitespace character on the current line, or if already there, go to the absolute beginning of the line.
- Set the backup directory to
- Show column numbers in the mode line.
- Scroll compilation output until the first error. (Bug: only works when compilation window is active.)
- Sets various c-mode options for Blender development
- Enable electric-pair-mode, typing things like an open parenthesis or open bracket will automatically insert the closing one.
- Add the command
c-section-comment. Takes the text on the current line and surrounds it with /* ... */, padding with asterisks such that it ends up at 72 characters in length. Bound to
- Add commands
gud-gdb-dir, which do the same thing as
gud-gdb, but ask for a directory first. They also protect the window after starting their command. gud-gdb-dir will also set the gud-gdb-colors-mode explained below. Bound to
- Add keys
C-zzto comment and uncomment a region.
- Add key
C-zhto switch between header and source file (with ff-find-other-file).
- Add key
C-zmto open a manpage.
- Add key
C-zcto recompile in the
compilation-always-kill.el by Kevin Ryde. This allows
starting a new compile while a compile is already running, without
asking if it's OK to kill.
TODO: verify that the command in git.el aren't already available through other means in Emacs.
git-root-dir finds the absolute path of the git root
directory (assuming the current directory either is a git root
directory or a subdirectory of one.)
Note: many of the commands in git.el are not very robust if run outside of a directory controlled by git (subdirectories are fine though.)
git commit --amend
git add filename, where filename is the current buffer's filename.
C-zvllooks for the commit that last touched the current line of the current buffer. If found, the commit's log is echoed, and the commit hash is copied to the kill ring.
C-zvrrstarts an interactive rebase, with the starting commit of the same commit that
git rebase --continue
C-c C-jruns rgrep, but skips the question about what directory to search and uses the git root.
C-cftakes a filename and tries to find it somewhere in the git repository. If a single result is found, the file is opened. Otherwise it will show all matching results.
Adds a command
gud-gdb-colors-mode which gives gud-gdb nicer
syntax highlighting. Function names and line numbers in the
backtrace format will be highlighted.
latex-run-command to output PDF rather than DVI,
tex-dvi-view-command to run Evince rather than
xdvi. These are still bound to the default
C-c C-v and
Includes a heavily modified version of the Zenburn theme by
Dirk-Jan C. Binnema. My version kinda kills the
intent of the original, and uses Tango colors instead.
- Enable winner-mode by default.
- Go to the next window with
- Go to the previous window with
- Toggle the
protectedstatus of a window with
C-z C-w. A protected window won't be picked when a new buffer opens, helpful for things like a compilation buffer or shell that you always want around.
- Enter and exit a writing mode with
C-z [, respectively. When in writing mode, visual-line-mode wrapping is used, and the text is centered in the window with a width of 79 characters.
<f8>split the window below and right, respectively. All windows in the frame will be rebalanced as well.
License and Authorship
Some files list their own license. Anything else (written by Nicholas Bishop) is public domain.
Note that I (Nicholas Bishop) do not claim to be wizardly with Emacs, so much of what you find here might not be good!