-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.emacs-origin
142 lines (116 loc) · 4.28 KB
/
.emacs-origin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
;; custome function definitions.
(defun revert-buffer-no-confirm ()
"Revert buffer without confirmation."
(interactive)
(revert-buffer t t))
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(require 'package)
(add-to-list
'package-archives
'("melpa" . "http://melpa.org/packages/")
t)
(package-initialize)
(add-to-list 'package-archives '("marmalade" . "https://marmalade-repo.org/packages/"))
(package-initialize)
;; initialize global modes.
;;(show-paren-mode)
(global-diff-hl-mode)
(autoload 'moz-minor-mode "moz.el" "Mozilla Minor and Inferior Mozilla Modes" t)
(add-hook 'javascript-mode-hook 'javascript-custom-setup)
(defun javascript-custom-setup ()
(moz-minor-mode 1))
(defun moz-send-string (&optional s)
(interactive)
(comint-send-string (inferior-moz-process) (or s (read-string "repl> "))))
(defun moz-page-reload ()
(interactive)
(moz-send-string "content.location.reload();"))
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
;; set global variables.
(setq make-backup-files nil)
(setq auto-save-file-name nil)
(setq auto-save-default nil)
(define-key global-map [f5] 'toggle-truncate-lines)
;;(keyboard-translate ?\C-f ?\C-l)
;;(keyboard-translate ?\C-l ?\C-f)
;;(keyboard-translate ?\C-b ?\C-j)
;;(keyboard-translate ?\C-j ?\C-b)
;;(keyboard-translate ?\C-p ?\C-i)
;;(keyboard-translate ?\C-i ?\C-p)
;;(keyboard-translate ?\C-n ?\C-k)
;;(keyboard-translate ?\C-k ?\C-n)
;;(keyboard-translate ?\M-f ?\M-l)
;;(keyboard-translate ?\M-l ?\M-f)
;;(keyboard-translate ?\M-b ?\M-j)
;;(keyboard-translate ?\M-j ?\M-b)
;;(keyboard-translate ?\M-p ?\M-i)
;;(keyboard-translate ?\M-i ?\M-p)
;;(keyboard-translate ?\M-n ?\M-k)
;;(keyboard-translate ?\M-k ?\M-n)
(org-babel-do-load-languages
'org-babel-load-languages
'((dot . t)))
(load (expand-file-name "~/quicklisp/slime-helper.el"))
;; Replace "sbcl" with the path to your implementation
(setq inferior-lisp-program "sbcl")
(require 'auto-complete-config)
(setq ac-directory-directories "/home/guff/.emacs.d/elpa/auto-complete-1.4/dict")
(setq-default ac-sources
'(ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers))
(ac-config-default)
(add-to-list 'load-path "/home/guff/.emacs.d/elpa/ag.el-master")
(require 'ag)
(require 'projectile)
(projectile-global-mode)
(add-to-list 'load-path "~/.emacs.d/elpa/helm-projectile-0.10.0/")
(require 'helm-config)
(require 'yasnippet)
(yas-global-mode 1)
(setq yas-snippet-dirs
'("/home/guff/.emacs.d/elpa/yasnippet-0.8.0/snippets" ;; personal snippets
"/path/to/some/collection/" ;; foo-mode and bar-mode snippet collection
"/path/to/yasnippet/yasmate/snippets" ;; the yasmate collection
"/path/to/yasnippet/snippets" ;; the default collection
))
(require 'sr-speedbar)
(global-set-key (kbd "<f12>") 'sr-speedbar-toggle)
(require 'emmet-mode)
(require 'google-translate)
(require 'google-translate-smooth-ui)
(setq google-translate-default-source-language "English")
(setq google-translate-default-target-language "Russian")
(global-set-key (kbd "C-t") 'google-translate-at-point)
(global-set-key (kbd "C-M-r") 'revert-buffer-no-confirm)
(global-set-key (kbd "C-x G") 'magit-status)
;;(global-set-key (kbd "C-t") 'google-translate-query-translate)
;;(require 'ido)
;;(ido-mode t)
;;(setq ido-enable-flex-matching t)
;;path to load plugins.
(add-to-list 'load-path "/home/guff/.emacs.d/elpa/")
(smart-tabs-insinuate 'javascript 'nxml)
(require 'whitespace)
(require 'linum)
(setq linum-format "%d " )
(global-linum-mode 1)
;;(defun my/insert-line-before ()
;; (interactive)
;;(save-excursion
;; (move-beginning-of-line 1)
;; (newline)))
(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.
'(google-translate-default-source-language "en")
'(google-translate-default-target-language "ru"))
(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.
)
(put 'upcase-region 'disabled nil)