Skip to content

Instantly share code, notes, and snippets.

(setq rlb3/required-packages
(list 'ack-and-a-half
'alert
'apache-mode
'cl-lib
'cperl-mode
'crontab-mode
'ctags
'ctags-update
'cyberpunk-theme
;;;
(require 'server)
(unless (server-running-p)
(server-start))
(defun rlb3/run-file-run-command (command dir)
(with-temp-buffer
(cd dir)
(setq eshell-prompt-function
(lambda ()
(concat
(eshell/pwd)
(let ((name (eshell/git-branch-name)))
(if name
(concat " (" name ")"))
" $ "))))
;; git symbolic-ref HEAD 2> /dev/null | cut -b 12-
(require 'git-gutter)
;; If you enable global minor mode
(global-git-gutter-mode t)
(global-set-key (kbd "C-c C-g") 'git-gutter:toggle)
(global-set-key (kbd "C-c v =") 'git-gutter:popup-diff)
;; Jump to next/previous hunk
(global-set-key (kbd "M-p") 'git-gutter:previous-hunk)
(if (file-exists-p "/usr/bin/hunspell")
(progn
(setq ispell-program-name "hunspell")
(eval-after-load "ispell"
'(progn
(defun ispell-get-coding-system () 'utf-8)))))
(setq org-time-stamp-rounding-minutes '(0 1))
(setq org-src-fontify-natively t)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(setq org-todo-keywords
(quote ((sequence "TODO(t)" "NEXT(n)" "STARTED(s)" "|" "DONE(d!/!)")
(sequence "WAITING(w@/!)" "SOMEDAY(S!)" "|" "CANCELLED(c@/!)" "PHONE")
(disable-theme 'zenburn)
(load-theme 'cyberpunk t)
;;; perltidy.el --- Tidy perl code
;; Copyright (C) 2007 Free Software Foundation, Inc.
;;
;; Author: Ye Wenbin <wenbinye@gmail.com>
;; Maintainer: Ye Wenbin <wenbinye@gmail.com>
;; Created: 22 Dec 2007
;; Version: 0.01
;; Keywords: tools, convenience, languages
;;; find-file-in-git-repo.el --- Utility to find files in a git repo
;; Copyright 2011 atom smith
;; Author: atom smith
;; URL: http://github.com/re5et/find-file-in-git-repo
;; Version: 0.1.2
;;; Commentary:
(require 's)
(defun rlb3/toggle-file ()
(interactive)
(let* ((full-path (buffer-file-name))
(path (rlb3/remove-ulc full-path))
(file-type (rlb3/determine-file-type path)))
(if (eq file-type 'test)
(rlb3/jump-to-related-test path)
(rlb3/jump-to-related-module path))))