update .emacs, remove init.el

This commit is contained in:
2016-08-08 18:55:52 +03:00
parent f0a44728c6
commit 2c43bf4879
2 changed files with 64 additions and 78 deletions

72
.emacs
View File

@@ -1,17 +1,73 @@
(setq slime-lisp-implementations
'((sbcl ("/usr/bin/sbcl"))
(ccl ("/usr/bin/ccl"))))
(setq slime-contribs '(slime-fancy))
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(column-number-mode t)
(setq-default indent-tabs-mode nil)
(setq-default c-basic-offset 4)
(setq inhibit-startup-screen t)
(desktop-save-mode 1)
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/"))
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-hook 'lisp-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
;;; XEmacs backwards compatibility file
(load-theme 'tango-dark t)
(add-to-list 'auto-mode-alist '("\\.asm\\'" . nasm-mode))
(setq user-init-file
(expand-file-name "init.el"
(expand-file-name ".emacs.d" "~")))
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(add-to-list 'load-path "~/.emacs.d/third-party")
(set-face-attribute 'default nil :font "MS Mincho-12")
(set-fontset-font t 'unicode "MS Mincho-12" nil 'prepend)
(set-fontset-font t 'unicode "Unifont 12" nil 'prepend)
(load-file user-init-file)
(global-set-key (kbd "ESC ESC ESC") nil)
(global-set-key (kbd "C-c C-j") 'avy-goto-word-or-subword-1)
(global-set-key (kbd "C-x w") 'ace-window)
(require 'ido)
(ido-mode t)
(setq ido-enable-flex-matching t)
(setq ido-default-buffer-method 'selected-window) ;;; I hate ido switching to other frame
(global-set-key (kbd "C-x C-b") 'buffer-menu)
(setq mouse-yank-at-point t)
;;; Set windowd width
(defun set-window-width (n)
"Set the selected window's width."
(adjust-window-trailing-edge (selected-window) (- n (window-width)) t))
(defun set-80-columns ()
"Set the selected window to 80 columns."
(interactive)
(set-window-width 80))
(global-set-key "\C-x~" 'set-80-columns)
;;; Rust autocomplete
(add-hook 'rust-mode-hook #'racer-mode)
(add-hook 'racer-mode-hook #'eldoc-mode)
(add-hook 'racer-mode-hook #'company-mode)
(setq company-tooltip-align-annotations t)
(add-to-list 'exec-path "/home/ex/.cargo/bin/")

70
init.el
View File

@@ -1,70 +0,0 @@
(setq inferior-lisp-program "/usr/bin/sbcl") ; your Lisp system
(add-to-list 'load-path "~/programming/lisp/slime") ; your SLIME directory
(require 'slime)
(slime-setup '(slime-fancy))
;;; Erlang mode
(setq load-path (cons "/usr/lib/erlang/lib/tools-2.6.6.4/emacs"
load-path))
(setq erlang-root-dir "/usr/lib/erlang")
(setq exec-path (cons "/usr/lib/erlang/bin" exec-path))
(require 'erlang-start)
;;; Forth mode
(autoload 'forth-mode "gforth.el")
(setq auto-mode-alist (cons '("\\.fs\\'" . forth-mode)
auto-mode-alist))
(autoload 'forth-block-mode "gforth.el")
(setq auto-mode-alist (cons '("\\.fb\\'" . forth-block-mode)
auto-mode-alist))
(add-hook 'forth-mode-hook (function (lambda ()
;; customize variables here:
(setq forth-indent-level 4)
(setq forth-minor-indent-level 2)
(setq forth-hilight-level 3)
;;; ...
)))
;;; COOL-mode
(autoload 'cool-mode "cool-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.cool\\'" . cool-mode))
;;; yacc/bison-mode
(autoload 'bison-mode "bison-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.y\\'" . bison-mode))
;;; Flex mode
(autoload 'flex-mode "flex-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.flex\\'" . flex-mode))
;;; GLSL-mode
(autoload 'glsl-mode "glsl-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.vert\\'" . glsl-mode))
(add-to-list 'auto-mode-alist '("\\.frag\\'" . glsl-mode))
(setq-default c-basic-offset 4)
(setq column-number-mode t)
(global-set-key [insert] 'delete-selection-mode) ;; [Ins]
(require 'no-easy-keys)
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(column-number-mode t)
(setq inhibit-startup-screen t)
(desktop-save-mode 1)
(no-easy-keys 1)
(custom-set-variables
'(haskell-mode-hook '(turn-on-haskell-indentation))
'(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
'(custom-enabled-themes (quote (tsdh-dark))))
(set-default 'indent-tabs-mode nil)
(add-hook 'erlang-mode-hook '(lambda() (setq indent-tabs-mode nil)))
(set-face-attribute 'default nil :family "Inconsolata" :height 150)
(set-fontset-font "fontset-default" '(#x400 . #x4FF) "Terminus")
(require 'rust-mode)