Add key binding to visit init file and index.org
Inspired by http://emacsredux.com/blog/2013/05/18/instant-access-to-init-dot-el/
This commit is contained in:
parent
e0e2fd262e
commit
ef42a03d3a
4
init.el
4
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
|
||||
|
@ -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")))
|
||||
|
Loading…
Reference in New Issue
Block a user