forked from h2oai/h2o-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
emacs_init.el
93 lines (78 loc) · 4.14 KB
/
emacs_init.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
;; Set the debug option to enable a backtrace when a problem occurs.
;;(setq debug-on-error t)
;; TAGS!!!
;;rm TAGS; ctags -e --recurse=yes --extra=+q --fields=+fksaiS
;; JDEE. For me: mostly the debugger
(add-to-list 'load-path (expand-file-name "~/Desktop/Dropbox/Programs/Emacs/jdee-2.4.0.1/lisp"))
;; CEDET
(add-to-list 'load-path "~/Desktop/Dropbox/Programs/Emacs/cedet-1.0.1/")
(add-to-list 'load-path "~/Desktop/Dropbox/Programs/Emacs/cedet-1.0.1/common")
(add-to-list 'load-path "~/Desktop/Dropbox/Programs/Emacs/cedet-1.0.1/eieio")
(add-to-list 'load-path "~/Desktop/Dropbox/Programs/Emacs/cedet-1.0.1/ede")
(add-to-list 'load-path "~/Desktop/Dropbox/Programs/Emacs/cedet-1.0.1/speedbar")
(add-to-list 'load-path "~/Desktop/Dropbox/Programs/Emacs/cedet-1.0.1/semantic")
(add-to-list 'load-path "~/Desktop/Dropbox/Programs/Emacs/cedet-1.0.1/srecode")
(load-file "~/Desktop/Dropbox/Programs/Emacs/cedet-1.0.1/common/cedet.el")
;;(global-ede-mode t) ;; Turn on EDE
;; Pretty-print Java (ok, overkill pretty)
;;(semantic-load-enable-excessive-code-helpers)
(semantic-load-enable-gaudy-code-helpers)
;; TAGs; symbol find and completion
(require 'semantic-ia)
;;Start inline completion
;; M-x semantic-complete-analyze-inline
;; This is a command that does completion inline (underlining the target symbol) and allows TAB to be used for completion purposes.
;; Automatically starting inline completion in idle time
;; M-x global-semantic-idle-completions-mode
;; This is a minor mode which runs semantic-complete-analyze-inline-idle during idle time. Instead of trying to complete the symbol immediately, it will just display the possible completions, and underline the current symbol the cursor is on.
;; Starting for inline completion when "." is pressed
;; (define-key your-mode-map-here "." 'semantic-complete-self-insert)
;; Binding semantic-complete-self-insert to a key will insert that key's text, as per self-insert-command, and then run the inline completion engine if there is appropriate context nearby.
;; Speedbar completion mode
;; M-x semantic-speedbar-analysis
;; This will start Speedbar in a special mode. In this mode it will analyze the cursor location, and provide intelligent references. Unlike inline completion, a raw list of options is provided and you just need to click on the one you want. Sometimes you need to press g to force an update.
;; Sets the basic indentation for Java source files to two spaces.
(defun my-jde-mode-hook ()
(setq c-basic-offset 2))
(add-hook 'jde-mode-hook 'my-jde-mode-hook)
;; Finally drag in all of JDEE
(require 'jde)
;; BASH
(setq binary-process-input t)
(setq w32-quote-process-args ?\")
(setq shell-file-name "bash") ;; or sh if you rename your bash executable to sh.
(setenv "SHELL" shell-file-name)
(setq explicit-shell-file-name shell-file-name)
(setq explicit-sh-args '("-login" "-i"))
(setenv '"PS1" '"[\w] ")
;; eshell clear
(defun eshell/clear ()
"04Dec2001 - sailor, to clear the eshell buffer."
(interactive)
(let ((inhibit-read-only t))
(erase-buffer)))
(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.
'(jde-compile-option-debug (quote ("all" (t t t))))
'(jde-compile-option-source (quote ("1.6")))
'(jde-compile-option-sourcepath (quote ("./src")))
'(jde-debugger (quote ("JDEbug")))
'(jde-global-classpath (quote (".")))
'(jde-javadoc-gen-destination-directory "./doc" t)
'(jde-jdk-doc-url "c:/Program Files (x86)/Java/jdk1.7.0_03/jdk-6-doc/docs")
'(jde-jdk-registry (quote (("1.6" . "$JAVA_HOME"))))
'(jde-run-working-directory "~/Desktop/Dropbox/lock_state")
'(jdibug-connect-hosts (quote ("localhost:4444")))
'(semanticdb-project-roots (quote ("~/Dropbox/lock_state")))
'(show-paren-mode t)
'(text-mode-hook (quote (text-mode-hook-identify)))
'(transient-mark-mode t))
(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.
)