Last active
August 29, 2015 14:07
-
-
Save avli/d4d3a48ef77c18d64e73 to your computer and use it in GitHub Desktop.
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 inhibit-splash-screen t) | |
(setq default-directory "~") | |
(setq default-input-method 'russian-computer) | |
(setenv "PATH" | |
(concat (getenv "PATH") | |
":/usr/local/bin:/usr/texbin")) | |
(setq exec-path (setq exec-path | |
(append '("/usr/local/bin") '("/usr/texbin") exec-path))) | |
(require 'package) | |
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "http://marmalade-repo.org/packages/") | |
("melpa" . "http://melpa.milkbox.net/packages/"))) | |
(package-initialize) | |
(setq-default light-theme 'leuven) | |
(setq-default dark-theme 'twilight) | |
(if (display-graphic-p) | |
(progn | |
(set-face-attribute 'default nil :font "Ubuntu Mono-14") | |
(set-fontset-font "fontset-default" 'cyrillic '("Ubuntu Mono-14" . "ISO10646-1")) | |
(load-theme light-theme t))) | |
(setq ring-bell-function 'ignore) | |
(column-number-mode 1) | |
(menu-bar-mode 1) | |
(global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally) | |
(global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally) | |
(global-set-key (kbd "S-C-<down>") 'shrink-window) | |
(global-set-key (kbd "S-C-<up>") 'enlarge-window) | |
(windmove-default-keybindings) | |
(global-set-key (kbd "C-+") 'text-scale-increase) | |
(global-set-key (kbd "C--") 'text-scale-decrease) | |
(set-default 'tab-width 4) | |
(setq ido-enable-flex-matching t) | |
(setq ido-everywhere t) | |
(ido-mode 1) | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) | |
(defalias 'yes-or-no-p 'y-or-n-p) | |
(setq flycheck-check-syntax-automatically nil) | |
(defun maybe-linum () | |
(if (display-graphic-p) | |
(linum-mode))) | |
(defun my-prog-mode-hook () | |
(flycheck-mode) | |
(maybe-linum)) | |
(add-hook 'prog-mode-hook 'my-prog-mode-hook) | |
(global-set-key (kbd "C-x m") 'multi-term-next) | |
(global-set-key (kbd "C-x M") 'multi-term) | |
(add-hook 'term-mode-hook | |
(lambda () | |
(add-to-list 'term-bind-key-alist '("M-[" . multi-term-prev)) | |
(add-to-list 'term-bind-key-alist '("M-]" . multi-term-next)) | |
(add-to-list 'term-bind-key-alist '("C-c C-j" . term-line-mode)) | |
(add-to-list 'term-bind-key-alist '("C-c C-k" . term-char-mode)) | |
(add-to-list 'term-bind-key-alist '("C-c C-q" . term-pager-toggle)))) | |
(add-hook 'python-mode-hook 'anaconda-mode) | |
(add-hook 'python-mode-hook 'my-prog-mode-hook) | |
(setq load-path (cons "/usr/local/lib/erlang/lib/tools-2.7/emacs" | |
load-path)) | |
(setq erlang-root-dir "/usr/local") | |
(setq exec-path (cons "/usr/local/bin" exec-path)) | |
(require 'erlang-start) | |
(add-hook 'erlang-mode-hook 'my-prog-mode-hook) | |
(defun lights-on () | |
(interactive) | |
(disable-theme dark-theme) | |
(load-theme light-theme t)) | |
(defun lights-off () | |
(interactive) | |
(disable-theme light-theme) | |
(load-theme dark-theme t)) | |
(global-set-key [f5] 'lights-off) | |
(global-set-key [f6] 'lights-on) | |
(provide 'init) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment