Created
November 5, 2016 13:30
-
-
Save tlkahn/441aa2e4a01794a61a9f3b3dd2a393bb to your computer and use it in GitHub Desktop.
.emacs
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 'package) | |
(setq package-archives '(("ELPA" . "http://tromey.com/elpa/") | |
("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "http://marmalade-repo.org/packages/"))) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t) | |
(package-initialize) | |
;; (package-refresh-contents) | |
(require 'ido) | |
(ido-mode t) | |
(global-set-key (kbd "s-<right>") 'move-end-of-line) | |
(global-set-key (kbd "s-<left>") 'move-beginning-of-line) | |
(defun end-of-line-and-indented-new-line () | |
(interactive) | |
(end-of-line) | |
(newline-and-indent)) | |
(global-set-key (kbd "<s-return>") 'end-of-line-and-indented-new-line) | |
(global-set-key (kbd "M-<return>") 'eval-last-sexp) | |
(global-set-key (kbd "C-s-<left>") 'previous-buffer) | |
(global-set-key (kbd "C-s-<right>") 'next-buffer) | |
(menu-bar-mode -1) | |
(tool-bar-mode -1) | |
(scroll-bar-mode -1) | |
(show-paren-mode t) | |
(electric-pair-mode t) | |
;; (require 'icicles) | |
;; (icy-mode 1) | |
;; (add-hook 'window-setup-hook 'toggle-frame-maximized t) | |
(setq visible-bell t) | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) | |
(set-default-font "sf mono 11") | |
(menu-bar-mode 0) | |
(setq gdb-many-windows 1) | |
(add-to-list 'load-path "/Users/toeinriver/.emacs.d/disaster") | |
(require 'disaster) | |
(global-set-key (kbd "C-c d") 'disaster) | |
(global-set-key (kbd "S-s") 'save-buffer) | |
(set-frame-parameter (selected-frame) 'alpha '(95 . 50)) | |
(add-to-list 'default-frame-alist '(alpha . (95 . 50))) | |
(defun toggle-transparency () | |
(interactive) | |
(let ((alpha (frame-parameter nil 'alpha))) | |
(set-frame-parameter | |
nil 'alpha | |
(if (eql (cond ((numberp alpha) alpha) | |
((numberp (cdr alpha)) (cdr alpha)) | |
;; Also handle undocumented (<active> <inactive>) form. | |
((numberp (cadr alpha)) (cadr alpha))) | |
100) | |
'(85 . 50) '(80 . 80))))) | |
;;(global-set-key (kbd "C-c t") 'toggle-transparency) | |
(defun comment-or-uncomment-region-or-line () | |
"Comments or uncomments the region or the current line if there's no active region." | |
(interactive) | |
(let (beg end) | |
(if (region-active-p) | |
(setq beg (region-beginning) end (region-end)) | |
(setq beg (line-beginning-position) end (line-end-position))) | |
(comment-or-uncomment-region beg end))) | |
(global-set-key (kbd "s-/") 'comment-or-uncomment-region-or-line) | |
(global-set-key (kbd "s-B") 'shell-command) | |
(global-unset-key (kbd "C-M-SPC")) | |
(global-set-key (kbd "s-k") 'erase-buffer) | |
(global-set-key (kbd "s-w") 'kill-buffer) | |
(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. | |
'(package-selected-packages (quote (icicles intero exec-path-from-shell avy)))) | |
(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. | |
) | |
;; (setq mouse-wheel-scroll-amount '(1)) | |
(setq mouse-wheel-scroll-amount '(1 ((shift) . 2) ((control) . nil))) | |
(setq mouse-wheel-progressive-speed nil) | |
(setq ring-bell-function 'ignore) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment