diff --git a/init.el b/init.el index c77c358..fed17bd 100644 --- a/init.el +++ b/init.el @@ -956,7 +956,9 @@ ("m" . hidden-mode-line-mode) ("C-i e" . "gergely@polonkai.eu") ("C-i w" . "http://gergely.polonkai.eu/") - ("C-p" . package-list-packages)) + ("C-p" . package-list-packages) + ("o i" . gpolonkai/visit-init-file) + ("o o" . gpolonkai/visit-org-index)) ;; Kudos goes to ;; http://endlessparentheses.com/leave-the-cursor-at-start-of-match-after-isearch.html diff --git a/lisp/file-manip.el b/lisp/file-manip.el index c50fc7a..982f4e6 100644 --- a/lisp/file-manip.el +++ b/lisp/file-manip.el @@ -11,3 +11,14 @@ buffer is not visiting a file, prompt for a file name." (if buffer-file-name (find-alternate-file tramp-path) (find-file tramp-path)))) + +(defun gpolonkai/visit-init-file () + "Open the init file." + (interactive) + (find-file-other-window user-init-file)) + +(defun gpolonkai/visit-org-index () + "Visit the root of Org-mode notes." + (interactive) + (find-file-other-window (concat (file-name-as-directory org-directory) + "index.org")))