root/dotfiles/emacs/yappo/.emacs @ 38025

Revision 38025, 2.2 kB (checked in by yappo, 4 years ago)

add php-mode

Line 
1(display-time)
2(setq make-backup-files nil)
3(setq scroll-step 1)
4
5
6;; 引数をload-pathへ追加する
7(defun add-to-load-path (&rest paths)
8  (mapc '(lambda (path)
9           (add-to-list 'load-path path))
10        (mapcar 'expand-file-name paths)))
11
12;; elispと設定ファイルのディレクトリをload-pathに追加
13(add-to-load-path "~/.emacs.d/elisp"
14                  "~/.emacs.d/conf")
15
16(require 'anything-config)
17(require 'perl-completion)
18(perl-completion-mode t)
19(require 'auto-complete)
20(global-auto-complete-mode t)
21
22
23;;(autoload 'javascript-mode "javascript-mode" "JavaScript mode" t)
24;;(autoload 'c-mode "c-mode" "C mode" t)
25(autoload 'js2-mode "js2-mode" nil t)
26(autoload 'php-mode "php-mode" "PHP mode" t)
27
28(load "init-siteconf")
29(load "init-perl")
30(load "init-javascript")
31(load "init-php")
32(load "init-actionscript")
33
34(defun my-insert-date ()
35  (interactive)
36  (insert (format-time-string "%Y-%m-%dT%R:%S+09:00" (current-time))))
37(custom-set-variables
38  ;; custom-set-variables was added by Custom.
39  ;; If you edit it by hand, you could mess it up, so be careful.
40  ;; Your init file should contain only one such instance.
41  ;; If there is more than one, they won't work right.
42 '(gud-gdb-command-name "gdb --annotate=1")
43 '(large-file-warning-threshold nil)
44 '(safe-local-variable-values (quote ((c-indentation-style . bsd)))))
45(custom-set-faces
46  ;; custom-set-faces was added by Custom.
47  ;; If you edit it by hand, you could mess it up, so be careful.
48  ;; Your init file should contain only one such instance.
49  ;; If there is more than one, they won't work right.
50 )
51
52;; package を入力するやつ
53(defun perl-insert-package ()
54  (interactive)
55  (require 'perl-completion)
56  (cond
57   ((null buffer-file-truename) (error "no buffer-file-truename"))
58   (t
59    (let* ((s (replace-regexp-in-string
60               (rx-to-string `(and bol ,(plcmp--get-lib-path) (? "/")))
61               ""
62               (expand-file-name buffer-file-truename)))
63           (s (file-name-sans-extension (replace-regexp-in-string (rx "/") "::" (replace-regexp-in-string "^.+/lib/" "" s)))))
64      (insert "package " s ";")))))
65
66;;Color
67(if window-system (progn
68   (set-background-color "Black")
69   (set-foreground-color "Gray")
70   (set-cursor-color "Gray")
71 ))
Note: See TracBrowser for help on using the browser.