[emacs-berlin] Emacs Starter Kits

C. Florian Ebeling florian.ebeling at gmail.com
Sat Jul 26 16:39:59 CEST 2014


On 26.07.2014, at 15:45, Tilmann Singer <tils at tils.net> wrote:

> Arne Brasseur <arne.brasseur at gmail.com> writes:
>> For example some of the settings I have so far are:
>> 
>> (setq inhibit-splash-screen t)                  ; no splash screen
>> (menu-bar-mode -1)                              ; no menu bar
>> (tool-bar-mode -1)                                ; no tool bar
>> (scroll-bar-mode -1)                            ; no scroll bar
>> (setq initial-scratch-message nil)              ; empty *scratch* buffer
>> (setq x-select-enable-clipboard t)
>> (require 'uniquify)
>> (setq uniquify-buffer-name-style 'post-forward) ; "file.ext|dir" instead of
>> "file.ext<2>"
>> (fset 'yes-or-no-p 'y-or-n-p)
> 
> Agree with all of them!

Yes, I have these too. Another one the I like is to show whitespace mistakes upon toggling with C-x w:

(global-set-key (kbd "C-x w") (lambda () (setq 'show-trailing-whitespace t)))

All trailing whitespace becomes become redspace! :)

I bind C-. to open the string at the cursor, er, point to open in buffer.

(global-set-key (kbd "C-.") 'find-file-at-point)

Opening Magit is a major things, so I have it on Cmd-return (in Apple keys).

(global-set-key (kbd "M-RET") 'magit-status)

When writing lots of tests, i.e. when doing Ruby, I fing it useful to be able to touch a file easily. I use my own (googled?) function and put it on Alt-return. Then autotest / guard / grunt can pick it up and rerun. (This is for cases when only changing implementation and not the test.)

(defun touch ()
  "updates mtime on the file for the current buffer"
  (interactive)
  (let ((command (concat "touch " (shell-quote-argument (buffer-file-name)))))
    (shell-command command)
    (clear-visited-file-modtime)
    (message command)))

(global-set-key (kbd "s-<return>") 'touch)

Another thing I'm fond of is toggling between the two topmost buffers, which sits on Ctrl-Shift-Arrow-down:

(defun flip-buffer ()
  (interactive)
  (switch-to-buffer nil))

(global-set-key [C-S-down] 'flip-buffer)

I'm not sure if all of these deserve immediate premium level starter kit status, but those are at least the ones I still consider good ideas after having them around awhile =)

Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailb.org/pipermail/emacs-berlin/attachments/20140726/f82e2a2a/attachment.sig>


More information about the emacs-berlin mailing list