File init.el added (mode: 100644) (index 0000000..8a49b3a) |
|
1 |
|
(require 'package) |
|
2 |
|
(setq package-enable-at-startup nil) |
|
3 |
|
(add-to-list 'package-archives |
|
4 |
|
'("melpa" . "https://melpa.org/packages/")) |
|
5 |
|
|
|
6 |
|
(package-initialize) |
|
7 |
|
(unless (package-installed-p 'use-package) |
|
8 |
|
(package-refresh-contents) |
|
9 |
|
(package-install 'use-package)) |
|
10 |
|
|
|
11 |
|
(use-package zerodark-theme |
|
12 |
|
:ensure t |
|
13 |
|
:init |
|
14 |
|
(load-theme 'zerodark t)) |
|
15 |
|
|
|
16 |
|
(use-package ido-vertical-mode |
|
17 |
|
:ensure t |
|
18 |
|
:init |
|
19 |
|
(ido-vertical-mode 1)) |
|
20 |
|
(setq ido-vertical-define-keys 'C-n-and-C-p-only) |
|
21 |
|
|
|
22 |
|
(use-package smex |
|
23 |
|
:ensure t |
|
24 |
|
:init (smex-initialize) |
|
25 |
|
:bind |
|
26 |
|
("M-x" . smex)) |
|
27 |
|
|
|
28 |
|
(use-package switch-window |
|
29 |
|
:ensure t |
|
30 |
|
:config |
|
31 |
|
(setq switch-window-input-style 'minibuffer) |
|
32 |
|
(setq switch-window-increase 4) |
|
33 |
|
(setq switch-window-threshold 2) |
|
34 |
|
(setq switch-window-shortcut-style 'qwerty) |
|
35 |
|
(setq switch-window-qwerty-shortcuts |
|
36 |
|
'("a" "s" "d" "f" "j" "k" "l")) |
|
37 |
|
:bind |
|
38 |
|
([remap other-window] . switch-window)) |
|
39 |
|
|
|
40 |
|
(tool-bar-mode -1) |
|
41 |
|
(menu-bar-mode -1) |
|
42 |
|
(scroll-bar-mode -1) |
|
43 |
|
(defalias 'yes-or-no-p 'y-or-n-p) |
|
44 |
|
(setq inhibit-startup-message t) |
|
45 |
|
(setq ring-bell-function 'ignore) |
|
46 |
|
(setq backup-directory-alist `(("." . "~/.emacs.d/backups"))) |
|
47 |
|
(global-prettify-symbols-mode t) |
|
48 |
|
|
|
49 |
|
(defvar my-term-shell "/bin/ksh") |
|
50 |
|
(defadvice ansi-term (before force-ksh) |
|
51 |
|
(interactive (list my-term-shell))) |
|
52 |
|
(ad-activate 'ansi-term) |
|
53 |
|
|
|
54 |
|
(defun comp () |
|
55 |
|
(interactive) |
|
56 |
|
(let* ((name (concat "comp " (buffer-file-name (window-buffer (minibuffer-selected-window))))) |
|
57 |
|
(the-buffer (make-term name "comp" nil buffer-file-name))) |
|
58 |
|
(switch-to-buffer the-buffer) |
|
59 |
|
(term-mode))) |
|
60 |
|
(global-set-key (kbd "<f5>") 'comp) |
|
61 |
|
|
|
62 |
|
(defun split-and-follow-horiz () |
|
63 |
|
(interactive) |
|
64 |
|
(split-window-below) |
|
65 |
|
(balance-windows) |
|
66 |
|
(other-window 1)) |
|
67 |
|
(global-set-key (kbd "C-x 2") 'split-and-follow-horiz) |
|
68 |
|
|
|
69 |
|
(defun split-and-follow-verti () |
|
70 |
|
(interactive) |
|
71 |
|
(split-window-right) |
|
72 |
|
(balance-windows) |
|
73 |
|
(other-window 1)) |
|
74 |
|
(global-set-key (kbd "C-x 3") 'split-and-follow-verti) |
|
75 |
|
|
|
76 |
|
(global-set-key (kbd "<C-return>") 'ansi-term) |
|
77 |
|
(global-set-key (kbd "C-k") 'kill-whole-line) |
|
78 |
|
(global-set-key (kbd "C-c k") 'kill-line) |
|
79 |
|
(global-set-key (kbd "C-x b") 'ibuffer) |
|
80 |
|
(global-set-key (kbd "C-x C-b") 'ido-switch-buffer) |
|
81 |
|
(global-set-key (kbd "C-c n") 'next-buffer) |
|
82 |
|
(global-set-key (kbd "C-c p") 'previous-buffer) |
|
83 |
|
|
|
84 |
|
|
|
85 |
|
(setq ibuffer-expert t) |
|
86 |
|
|
|
87 |
|
(custom-set-variables |
|
88 |
|
;; custom-set-variables was added by Custom. |
|
89 |
|
;; If you edit it by hand, you could mess it up, so be careful. |
|
90 |
|
;; Your init file should contain only one such instance. |
|
91 |
|
;; If there is more than one, they won't work right. |
|
92 |
|
'(package-selected-packages |
|
93 |
|
(quote |
|
94 |
|
(switch-window smex ido-vertical-mode zerodark-theme use-package)))) |
|
95 |
|
(custom-set-faces |
|
96 |
|
;; custom-set-faces was added by Custom. |
|
97 |
|
;; If you edit it by hand, you could mess it up, so be careful. |
|
98 |
|
;; Your init file should contain only one such instance. |
|
99 |
|
;; If there is more than one, they won't work right. |
|
100 |
|
'(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 115 :width normal :foundry "PfEd" :family "Inconsolata"))))) |
|
101 |
|
|
|
102 |
|
(setq ido-enable-flex-matching nil) |
|
103 |
|
(setq ido-create-new-buffer 'always) |
|
104 |
|
(setq ido-everywhere t) |
|
105 |
|
(ido-mode 1) |
|
106 |
|
(put 'downcase-region 'disabled nil) |