Created
March 28, 2013 14:25
-
-
Save rlb3/5263527 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; | |
| (require 'server) | |
| (unless (server-running-p) | |
| (server-start)) | |
| (defun rlb3/run-file-run-command (command dir) | |
| (with-temp-buffer | |
| (cd dir) | |
| (compile command))) | |
| (defun rlb3/run-test () | |
| (interactive) | |
| (let ((file (buffer-file-name))) | |
| (rlb3/run-file-run-command (concat "/usr/local/cpanel/3rdparty/perl/514/bin/prove -lvwm --nocolor " file) "/usr/local/cpanel"))) | |
| (global-set-key (kbd "C-c C-o C-r") 'rlb3/run-test) | |
| ;; (require 'magit) | |
| ;; (set-face-background 'magit-item-highlight "black") | |
| ;; (global-set-key (kbd "M-x") 'smex) | |
| (defun testcover () | |
| (interactive) | |
| (let ((cpanel-dir "/usr/local/cpanel")) | |
| (cd cpanel-dir) | |
| (message (concat "Running testcover for " (buffer-file-name))) | |
| (compile (concat cpanel-dir "/build-tools/testcover" " --nocolor " (buffer-file-name))))) | |
| (defun cplint () | |
| (interactive) | |
| (cd "/usr/local/cpanel") | |
| (compile "cplint --no-color --skip CommitMessages --branched-from HEAD^")) | |
| (defadvice find-file-in-git-repo (around find-file-in-git-repo-around) | |
| "Always look in ulc" | |
| (let ((default-directory "/usr/local/cpanel/")) | |
| ad-do-it)) | |
| (ad-activate 'find-file-in-git-repo) | |
| (defalias 'ffg 'find-file-in-git-repo) | |
| (global-set-key (kbd "<f11>") 'yalinum-mode) | |
| (defun dired-back-to-top () | |
| (interactive) | |
| (beginning-of-buffer) | |
| (dired-next-line 4)) | |
| (define-key dired-mode-map | |
| (vector 'remap 'beginning-of-buffer) 'dired-back-to-top) | |
| (defun dired-jump-to-bottom () | |
| (interactive) | |
| (end-of-buffer) | |
| (dired-next-line -1)) | |
| (define-key dired-mode-map | |
| (vector 'remap 'end-of-buffer) 'dired-jump-to-bottom) | |
| (defadvice executable-make-buffer-file-executable-if-script-p (around executable-make-buffer-file-executable-if-script-p-around) | |
| "Tests should not be executable." | |
| (unless (string= ".t" (file-name-extension (buffer-name) t)) | |
| ad-do-it)) | |
| (ad-activate 'executable-make-buffer-file-executable-if-script-p) | |
| (add-to-list 'auto-mode-alist '("\\.htaccess\\'" . apache-mode)) | |
| (add-to-list 'auto-mode-alist '("httpd\\.conf\\'" . apache-mode)) | |
| (add-to-list 'auto-mode-alist '("srm\\.conf\\'" . apache-mode)) | |
| (add-to-list 'auto-mode-alist '("access\\.conf\\'" . apache-mode)) | |
| (add-to-list 'auto-mode-alist '("sites-\\(available\\|enabled\\)/" . apache-mode)) | |
| (global-set-key (kbd "<f10>") 'er/expand-region) | |
| (require 'multiple-cursors) | |
| (global-set-key (kbd "C-c C-e") 'mc/edit-lines) | |
| (global-set-key (kbd "C-c C-f") 'mc/mark-next-like-this) | |
| (global-set-key (kbd "C-c C-b") 'mc/mark-previous-like-this) | |
| (global-set-key (kbd "C-c C-x f") 'mc/mark-all-like-this) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment