Created
November 4, 2017 23:19
-
-
Save jl2/24b9bf51eef8c97c20b6a467dfaf8c6f to your computer and use it in GitHub Desktop.
Most recent .emacs
This file contains 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
(setq default-frame-alist | |
'((width . 124))) | |
(add-to-list 'load-path "~/.emacs_stuff/") | |
(load "~/.emacs_stuff/my_functions") | |
(autoload 'gid "idutils" nil t) | |
;; (setq vc-handled-backends nil) | |
(setq vc-handled-backends '(Git)) | |
(global-set-key "\C-\M-j" 'goto-line) | |
(global-set-key "\C-\M-c" 'comment-region) | |
(global-set-key "\C-\M-u" 'uncomment-region) | |
(global-set-key [f5] 'revert-buffer) | |
(global-set-key [f12] 'w3m-browse-url) | |
(global-set-key "\C-\M-p" 'replace-python-exp) | |
(global-set-key [backtab] 'decrease-left-margin) | |
(global-set-key [( control tab)] 'increase-left-margin) | |
(global-set-key [?\C-.] 'next-error) | |
(global-set-key [?\C-\,] 'previous-error) | |
(global-set-key [?\C-\'] 'dabbrev-expand) | |
(global-set-key [mouse-4] 'scroll-down-3) | |
(global-set-key [mouse-5] 'scroll-up-3) | |
(global-set-key [?\M-\C-=] 'recompile) | |
(global-set-key [?\M-\C-+] 'compile) | |
(global-set-key [?\C-\]] 'match-paren) | |
(global-set-key [( control x) (p)] 'previous-multiframe-window) | |
(global-set-key [f7] 'toggle-kbd-macro-recording-on) | |
(global-set-key [f8] 'call-last-kbd-macro) | |
(global-set-key [( control meta _ )] 'eval-region) | |
(global-set-key [( control \) )] 'find-char) | |
(global-set-key [( control \( )] 'find-char-backward) | |
(global-set-key [( control meta \) )] 'find-char-before) | |
(global-set-key [( control meta \( )] 'find-char-backward-after) | |
(global-set-key [(control f9)] 'af-bookmark-toggle ) | |
(global-set-key [f9] 'af-bookmark-cycle-forward ) | |
(global-set-key [(shift f9)] 'af-bookmark-cycle-reverse ) | |
(global-set-key [(control shift f9)] 'af-bookmark-clear-all ) | |
(global-set-key [( meta z )] 'toggle-fullscreen) | |
(global-set-key (kbd "C-M-SPC") 'my-select-current-word) | |
(global-set-key [( control meta { )] 'eval-and-replace) | |
(global-set-key [( meta f12 )] 'sf-run-unit-test) | |
(global-set-key [( XF86AudioPlay )] 'sf-run-this-unit-test) | |
(global-set-key [( XF86AudioNext )] 'sf-debug-this-unit-test) | |
(global-set-key "\C-\M-g" 'ddg-search) | |
(global-set-key [f6] 'ddg-search-region) | |
(global-set-key [( meta super q)] 'toggle-frame-maximized) | |
(global-set-key (kbd "C-x C-b") 'ibuffer) | |
(global-set-key (kbd "M-l") (lambda () (interactive) (insert (make-char 'greek-iso8859-7 107)))) | |
(add-to-list 'auto-mode-alist '("\\.sls\\'" . yaml-mode)) | |
(defun jl2-new-vertical-window-and-go-to-it () | |
"Create a new vertical window and go to it." | |
(interactive) | |
(split-window-vertically) | |
(other-window 1)) | |
(defun jl2-new-horizontal-window-and-go-to-it () | |
"Create a new horizontal window and go to it." | |
(interactive) | |
(split-window-horizontally) | |
(other-window 1)) | |
(setq split-window-keep-point 't) | |
(global-set-key [( control x ) ( 2 )] 'jl2-new-vertical-window-and-go-to-it) | |
;; (global-set-key [( control x ) ( 3 )] 'jl2-new-horizontal-window-and-go-to-it) | |
(defun isearch-yank-symbol-forward () | |
"Put symbol at current point into search string." | |
(interactive) | |
(let ((sym (find-tag-default))) | |
(message sym) | |
(word-search-forward sym))) | |
(defun isearch-yank-symbol-backward () | |
"Put symbol at current point into search string." | |
(interactive) | |
(let ((sym (find-tag-default))) | |
(message sym) | |
(word-search-backward sym))) | |
(global-set-key [(control =)] 'isearch-yank-symbol-forward) | |
(global-set-key [(control +)] 'isearch-yank-symbol-backward) | |
;; Turn off annoying splitting in Emacs 23.1 | |
(setq split-width-threshold nil) | |
(setq split-height-threshold 15) | |
(put 'set-goal-column 'disabled nil) | |
(setq column-number-mode t) | |
(setq inhibit-startup-message t) | |
(setq inhibit-splash-screen t) | |
(setq compilation-window-height 50) | |
(setq grep-window-height 50) | |
;; Doesn't do anything because mouse-4 and mouse-5 are overridden above... | |
;; (setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time | |
;; (setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling | |
;; (setq mouse-wheel-follow-mouse 't) ;; scroll window under mouse | |
;; (setq scroll-step 1 | |
;; scroll-conservatively 10000) | |
(add-hook 'isearch-mode-end-hook 'my-goto-match-beginning) | |
(defun my-goto-match-beginning () | |
(when (and isearch-forward isearch-other-end) | |
(goto-char isearch-other-end))) | |
(defadvice isearch-exit (after my-goto-match-beginning activate) | |
"Go to beginning of match." | |
(when (and isearch-forward isearch-other-end) | |
(goto-char isearch-other-end))) | |
;; ;; Added to use tabs instead of spaces | |
;; ;; Turn on tabs | |
(setq indent-tabs-mode nil) | |
(setq-default indent-tabs-mode nil) | |
;; (setq default-tab-width 4) | |
(setq tab-width 4) ; or any other preferred value | |
(defvaralias 'c-basic-offset 'tab-width) | |
(defvaralias 'cperl-indent-level 'tab-width) | |
(defvaralias 'js-indent-level 'tab-width) | |
(defun my-c-mode-hook () | |
(c-set-offset 'topmost-intro '-)) | |
(add-hook 'c-mode-hook 'my-c-mode-hook) | |
(setq browse-url-browser-function 'browse-url-generic | |
browse-url-generic-program "chromium") | |
(put 'downcase-region 'disabled nil) | |
(put 'upcase-region 'disabled nil) | |
(fset 'yes-or-no-p 'y-or-n-p) | |
(defun in-directory () | |
"Reads a directory name (using ido), then runs | |
execute-extended-command with default-directory in the given | |
directory." | |
(interactive) | |
(let ((default-directory | |
(ido-read-directory-name "In directory: " | |
nil nil t))) | |
(call-interactively 'execute-extended-command))) | |
(defvar *regions-highlighted* ()) | |
(defun highlight-region () | |
"Highlight the current region." | |
(interactive) | |
(let* ((rb (region-beginning)) | |
(re (region-end)) | |
(str (buffer-substring-no-properties rb re))) | |
(highlight-phrase str) | |
(setq *regions-highlighted* (cons str *regions-highlighted*)))) | |
(defun unhighlight-all-regions () | |
(interactive) | |
(dolist (region *regions-highlighted*) | |
(unhighlight-regexp region))) | |
(setq compile-command (concat "cd " (expand-file-name default-directory) " && ./scripts/dmake")) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(backup-directory-alist (quote ((".*" . "~/.backups")))) | |
'(c-default-style | |
(quote | |
((c-mode . "k&r") | |
(c++-mode . "java") | |
(java-mode . "java") | |
(awk-mode . "awk") | |
(other . "gnu")))) | |
'(c-hanging-braces-alist | |
(quote | |
((block-open after) | |
(block-close . c-snug-do-while) | |
(statement-cont) | |
(substatement-open after) | |
(brace-list-open) | |
(brace-entry-open) | |
(extern-lang-open after) | |
(namespace-open after) | |
(module-open after) | |
(composition-open after) | |
(inexpr-class-open after) | |
(inexpr-class-close before) | |
(arglist-cont-nonempty)))) | |
'(c-offsets-alist | |
(quote | |
((substatement-open . 0) | |
(substatement-open . 0) | |
(access-label . -) | |
(statement-case-open . 0)))) | |
'(column-number-mode t) | |
'(compilation-scroll-output t) | |
'(compilation-window-height 50) | |
'(custom-safe-themes | |
(quote | |
("eafda598b275a9d68cc1fbe1689925f503cab719ee16be23b10a9f2cc5872069" "32cafb607e5ae3bcdbdf5c20e935e0b9e78f80a804daf7656f10b6e4b3bc4d88" default))) | |
'(describe-char-unidata-list | |
(quote | |
(name old-name general-category canonical-combining-class bidi-class decomposition decimal-digit-value digit-value numeric-value mirrored iso-10646-comment uppercase lowercase titlecase))) | |
'(erc-nick "jlarocco") | |
'(fill-column 100) | |
'(font-lock-maximum-size nil) | |
'(grep-command "grep -i -n -e ") | |
'(grep-window-height 50) | |
'(haskell-mode-hook | |
(quote | |
(turn-on-haskell-doc turn-on-haskell-indent turn-on-haskell-indentation))) | |
'(horizontal-scroll-bar-mode nil) | |
'(menu-bar-mode nil) | |
'(package-selected-packages | |
(quote | |
(julia-shell sly geiser gopher markdown-mode haskell-mode))) | |
'(pos-tip-tab-width 4) | |
'(scroll-bar-mode nil) | |
'(shell-file-name "zsh") | |
'(show-paren-mode t) | |
'(size-indication-mode t) | |
'(sly-complete-symbol-function (quote sly-simple-completions)) | |
'(tab-width 4) | |
'(temp-buffer-max-height 50) | |
'(tool-bar-mode nil) | |
'(transient-mark-mode nil) | |
'(use-file-dialog nil) | |
'(visible-cursor t) | |
'(which-func-modes t) | |
'(which-function-mode t) | |
'(x-stretch-cursor t)) | |
;; (set-frame-font "-monotype-Andale Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1" nil t) | |
(add-to-list 'auto-mode-alist '("\\.json" . javascript-mode)) | |
(add-to-list 'auto-mode-alist '("\\.h" . c++-mode)) | |
(add-to-list 'auto-mode-alist '("\\.ipp" . c++-mode)) | |
(setq frame-title-format | |
'("Emacs - " (buffer-file-name "%f" (dired-directory dired-directory "%b")))) | |
(require 'package) | |
(package-initialize) | |
(add-to-list 'package-archives | |
'("marmalade" . "http://marmalade-repo.org/packages/") t) | |
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(set-frame-parameter (selected-frame) 'alpha '(20 50)) | |
(add-to-list 'default-frame-alist '(alpha 85 50)) | |
(setq python-shell-interpreter "/usr/local/bin/python3.4") | |
(eval-when-compile (require 'cl)) | |
(defun toggle-transparency () | |
(interactive) | |
(if (/= | |
(cadr (frame-parameter nil 'alpha)) | |
100) | |
(set-frame-parameter nil 'alpha '(100 100)) | |
(set-frame-parameter nil 'alpha '(85 50)))) | |
(global-set-key (kbd "C-c t") 'toggle-transparency) | |
(setq inferior-lisp-program "~/oss_src/ccl/lx86cl64") | |
(setq slime-net-coding-system 'utf-8-unix) | |
(defvar quicklisp-path (expand-file-name "/~/quicklisp")) | |
(load (concat quicklisp-path "/slime-helper")) | |
(slime-setup '(slime-fancy slime-mrepl slime-sprof)) | |
(setq slime-description-autofocus t) | |
(setf slime-scratch-file (expand-file-name "~/.slime-scratch.lisp")) | |
(setf slime-lisp-implementations | |
'((ccl ("/home/jeremiah/oss_src/ccl/lx86cl64")) | |
(sbcl "/usr/local/bin/sbcl --noinform --control-stack-size 4 --merge-core-pages"))) | |
(setq erc-hide-list '("JOIN" "PART" "QUIT")) | |
(load-theme 'tango-dark) | |
(server-start) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment