-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.el
76 lines (53 loc) · 2.21 KB
/
main.el
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
(setq load-path (cons "~/configs/emacs/" load-path))
(load "functions.el") ;
(load "keys.el") ;
(load "colors.el") ;
(load "highlight-indentation.el") ;
;;; short yes or no
(defalias 'yes-or-no-p 'y-or-n-p)
;;; automatically reloads any file changed on disk
(global-auto-revert-mode t)
;;; melpa
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)
;;; ask before closing end
(when window-system
(global-set-key (kbd "C-x C-c") 'ask-before-closing))
;;;; Modes
(add-auto-mode 'web-mode
"*html*" "*twig*" "*tmpl*" "\\.erb" "\\.rhtml$" "\\.ejs$" "\\.hbs$"
"\\.ctp$" "\\.tpl$" "/\\(views\\|html\\|templates\\)/.*\\.php$")
(add-auto-mode 'markdown-mode
"*.md")
;;(add-to-list 'default-frame-alist '(font . "Droid Sans Mono-11" ))
;;(set-face-attribute 'default t :font "Droid Sans Mono-11" )
(setq default-input-method "russian-computer")
(server-start)
(menu-bar-mode -1)
(tool-bar-mode -1)
;;: Set to the location of your Org files on your local system
(setq org-directory "~/Dropbox/org")
;;; Set to the name of the file where new notes will be stored
(setq org-mobile-inbox-for-pull "~/Dropbox/org/flagged.org")
;;; Set to <your Dropbox root directory>/MobileOrg.
(setq org-mobile-directory "~/Dropbox/Apps/MobileOrg")
; (require 'go-autocomplete)
;(require 'auto-complete-config)
; (ac-config-default)
;; from http://tleyden.github.io/blog/2014/05/22/configure-emacs-as-a-go-editor-from-scratch/
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell (replace-regexp-in-string
"[ \t\n]*$"
""
(shell-command-to-string "$SHELL --login -i -c 'echo $PATH'"))))
(setenv "PATH" path-from-shell)
(setq eshell-path-env path-from-shell) ; for eshell users
(setq exec-path (split-string path-from-shell path-separator))))
(when window-system (set-exec-path-from-shell-PATH))
(add-hook 'sgml-mode-hook 'emmet-mode) ;; Auto-start on any markup modes
(load "go.el") ;