-
Notifications
You must be signed in to change notification settings - Fork 0
/
.emacs.disabled
110 lines (99 loc) · 3.68 KB
/
.emacs.disabled
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
;; Undelivered Configuration
;; Flycheck
;; (leaf flycheck
;; :doc "On-the-fly syntax checking"
;; :req "dash-2.12.1" "pkg-info-0.4" "let-alist-1.0.4" "seq-1.11" "emacs-24.3"
;; :tag "minor-mode" "tools" "languages" "convenience" "emacs>=24.3"
;; :url "http://www.flycheck.org"
;; :emacs>= 24.3
;; :ensure t
;; ;; :bind (("M-n" . flycheck-next-error)
;; ;; ("M-p" . flycheck-previous-error))
;; :global-minor-mode global-flycheck-mode)
;;;
;;; ;; PHP
;;; (defun my-php-mode-hook ()
;;; "My PHP-mode hook."
;;; ;(require 'flycheck-phpstan)
;;; ;(flycheck-mode t)
;;; ;(flycheck-select-checker 'phpstan))
;;; )
;;; (add-hook 'php-mode-hook 'my-php-mode-hook)
;;;
;;;
;;; ; (global-flycheck-mode)
;;; ; (setq flycheck-indication-mode 'left-fringe)
;;; ; (setq flycheck-check-syntax-automatically '(mode-enabled save))
;;;
;;; ;; (define-key global-map [?¥] [?\\]) ;; ¥の代わりにバックスラッシュを入力する
;;;
;;; (setq frame-title-format "%f")
;;; (setq text-mode-hook 'turn-off-auto-fill)
;;;
;; Migemo
;; https://qiita.com/minoruGH/items/20d7664a3a57c7365ebc
;;
;; (defun ytn-ivy-migemo-re-builder (str)
;; (let* ((sep " \\|\\^\\|\\.\\|\\*")
;; (splitted (--map (s-join "" it)
;; (--partition-by (s-matches-p " \\|\\^\\|\\.\\|\\*" it)
;; (s-split "" str t)))))
;; (s-join "" (--map (cond ((s-equals? it " ") ".*?")
;; ((s-matches? sep it) it)
;; (t (migemo-get-pattern it)))
;; splitted))))
;;
;; (setq ivy-re-builders-alist '((t . ivy--regex-plus)
;; (swiper . ytn-ivy-migemo-re-builder)))
;; https://uwabami.github.io/cc-env/Emacs.html
; (leaf migemo
; :if (executable-find "cmigemo")
; :ensure t
; :custom
; '((migemo-user-dictionary . nil)
; (migemo-regex-dictionary . nil)
; (migemo-options . '("-q" "--emacs"))
; (migemo-command . "cmigemo")
; (migemo-coding-system . 'utf-8-unix)
; (file-directory-p . "/usr/local/share/cmigemo/utf-8/")
; (migemo-dictionary . "/usr/local/share/cmigemo/utf-8/migemo-dict"))
; :hook
; (after-init-hook . migemo-init))
;;; Org Mode
;;; ;; The following lines are always needed. Choose your own keys.
;;; (global-set-key "\C-cl" 'org-store-link)
;;; (global-set-key "\C-ca" 'org-agenda)
;;; (global-set-key "\C-cc" 'org-capture)
;;; (global-set-key "\C-cb" 'org-switchb)
;;;
;;;
;;; (setq org-directory "~/winhome/OneDrive/org")
;;; (setq org-default-notes-file "notes.org")
;;;
;;; ;; Org-capture
;;;
;;; ; Org-captureを呼び出すキーシーケンス
;;; (define-key global-map "\C-cc" 'org-capture)
;;; ; Org-captureのテンプレート(メニュー)の設定
;;; (setq org-capture-templates
;;; '(("n" "Note" entry (file+headline "~/winhome/OneDrive/org/notes.org" "Notes")
;;; "* %?\nEntered on %U\n %i\n %a")
;;; ))
;;;
;;;
;;; ;; メモをC-M-^一発で見るための設定
;;; ;; https://qiita.com/takaxp/items/0b717ad1d0488b74429d から拝借
;;; (defun show-org-buffer (file)
;;; "Show an org-file FILE on the current buffer."
;;; (interactive)
;;; (if (get-buffer file)
;;; (let ((buffer (get-buffer file)))
;;; (switch-to-buffer buffer)
;;; (message "%s" file))
;;; (find-file (concat "~/winhome/OneDrive/org/" file))))
;;; (global-set-key (kbd "C-M-^") '(lambda () (interactive)
;;; (show-org-buffer "notes.org")))
;;; (defun x-clipboard-copy ()
;;; (interactive)
;;; (when (region-active-p)
;;; (shell-command-on-region (region-beginning) (region-end) "clip.exe" nil nil)))