 (put 'upcase-region 'disabled nil)
 (setq auto-save-default nil)
 (setq create-lockfiles nil)
+
+
+(defun jump-to-github ()
+  "Go to github code position at most recent commitl;"
+  (let (full_path)
+    (setq
+     full_path buffer-file-name
+     dir_name (shell-command-to-string (concat "echo " full_path "| xargs dirname"))
+     cd_dir (shell-command-to-string (concat "cd " dir_name))
+     prefix (shell-command-to-string "git rev-parse  --show-prefix | tr -d '\n'")
+     current_commit (shell-command-to-string "git show -s --format=%H | tr -d '\n'")
+     current_line (1+ (count-lines 1 (point)))
+     repo_name (shell-command-to-string "git remote -v | grep origin | head -1 | awk '{sub(\"git@github.com:\",\"\");sub(\".git\",\"\");print $2}' | tr -d '\n'")
+     github_url (concat "https://github.com/"
+                        repo_name "/blob/" current_commit "/"
+                        prefix (buffer-name) "#L" (number-to-string current_line)))
+    (shell-command (concat "xdg-open " github_url))))
+
+(global-set-key (kbd "M-b") 'jump-to-github)

                    :background my/bg-color)


;indentでtabをつかわないようにする
(setq-default indent-tabs-mode nil)

; share clipboard
(setq x-select-enable-clipboard t)

;; コントロール用のバッファを同一フレーム内に表示


(setq whitespace-display-mappings
      '((space-mark ?\u3000 [?\u25a1])
        (space-mark   ?\xA0  [?\xA4]  [?_]) ; hard space - currency
        (space-mark   ?\x8A0 [?\x8A4] [?_]) ; hard space - currency
        (space-mark   ?\x920 [?\x924] [?_]) ; hard space - currency
        (space-mark   ?\xE20 [?\xE24] [?_]) ; hard space - currency
        (space-mark   ?\xF20 [?\xF24] [?_]) ; hard space - currency
        (newline-mark ?\n    [?\u21B5 ?\n] [?\u240D ?\n])
        ))

                                        ;(set-face-foreground 'whitespace-space "cyan")
                                        ;(set-face-background 'whitespace-space 'nil)

                                        ;(set-face-background 'whitespace-newline 'nil)
                                        ;(set-face-foreground 'whitespace-newline  "DarkGray")

                                        ;(set-face-underline  'whitespace-trailing 1)
                                        ;(set-face-foreground 'whitespace-trailing "cyan")
                                        ;(set-face-background 'whitespace-trailing 'nil)

;; 保存前に自動でクリーンアップ
(setq whitespace-action '(auto-cleanup))
