 
 (with-pkg 'flycheck
   ;; ...
-
+  (add-hook 'after-init-hook #'global-flycheck-mode)
   (with-pkg 'flycheck-pos-tip
     (setq flycheck-display-errors-function #'flycheck-pos-tip-error-messages))
-  )
-
+
+  (global-set-key "\M-e" 'flycheck-next-error)
+  (global-set-key "\M-E" 'flycheck-perv-error)
+  )
 
 ;; company-mode
 (with-pkg 'company

  ;; (ac-show-menu-immediately-on-auto-complete t)
  )

;; flymake 使うとき
(eval-after-load "flymake"
  '(let nil
     (defvar flymake-display-err-delay 1
       "delay to display flymake error message ")
     (defvar flymake-display-err-timer nil
       "timer for flymake-display-err-menu-for-current-line")
     (defvar flymake-display-err-before-line nil)
     (defvar flymake-display-err-before-colmun nil)

     (when window-system
       (set-face-attribute 'flymake-errline nil
                           :foreground nil
                           :background nil
                           :inherit nil))

     (when (featurep 'popup)

       ;; flymake 現在行のエラーをpopup.elのツールチップで表示する
       ;; https://gist.github.com/292827
       (defun flymake-display-err-menu-for-current-line ()
         (interactive)
         (let* ((line-no (line-number-at-pos))
                (line-err-info-list
                 (nth 0 (flymake-find-err-info flymake-err-info line-no))))
           (when (and (flymake-display-err-check-moved line-no (current-column))
                      line-err-info-list)
             (setq flymake-display-err-before-line-no line-no)
             (let* ((count (length line-err-info-list))
                    (menu-item-text nil))
               (while (> count 0)
                 (setq menu-item-text
                       (flymake-ler-text (nth (1- count) line-err-info-list)))
                 (let* ((file (flymake-ler-file (nth (1- count)
                                                     line-err-info-list)))
                        (line (flymake-ler-line (nth (1- count)
                                                     line-err-info-list))))
                   (if file
                       (setq menu-item-text
                             (concat menu-item-text " - " file "("
                                     (format "%d" line) ")"))))
                 (setq count (1- count))
                 (if (> count 0) (setq menu-item-text (concat menu-item-text "\n")))
                 )
               (popup-tip menu-item-text)))))

       (defun flymake-display-err-check-moved (cur-line cur-col)
         (let* ((is-not-moved (and flymake-display-err-before-line
                                   flymake-display-err-before-colmun
                                   (= cur-line flymake-display-err-before-line)
                                   (= cur-col flymake-display-err-before-colmun))))
           (setq flymake-display-err-before-line cur-line
                 flymake-display-err-before-colmun cur-col)
           (not is-not-moved)))

       (unless flymake-display-err-timer
         (setq flymake-display-err-timer
               (run-with-idle-timer flymake-display-err-delay
                                    t
                                    'flymake-display-err-menu-for-current-line)))

       (global-set-key "\M-e"
                       '(lambda ()
                          (interactive)
                          (message "next error")
                          (flymake-goto-next-error)
                          (flymake-display-err-menu-for-current-line)))
       (global-set-key "\M-E"
                       '(lambda ()
                          (interactive)
                          (message "prev error")
                          (flymake-goto-prev-error)
                          (flymake-display-err-menu-for-current-line)))
       )))

(with-pkg 'helm

  (setq
   helm-ff-transformer-show-only-basename nil
   helm-buffer-max-length 20)

              (kui/pop-as-assoc keys (nthcdr 2 seq)))
      nil)))

;; このファイル(init.el)を開く
(defun kui/find-init-file ()
  "Edit init file.
