Add prelude-find-shell-init-file
This commit is contained in:
parent
879d3f3470
commit
3c8f0c7f98
2 changed files with 11 additions and 0 deletions
|
@ -538,5 +538,15 @@ This follows freedesktop standards, should work in X servers."
|
|||
(interactive)
|
||||
(find-file-other-window user-init-file))
|
||||
|
||||
(defun prelude-find-shell-init-file ()
|
||||
"Edit the shell init file in another window."
|
||||
(interactive)
|
||||
(let* ((shell (car (reverse (s-split "/" (getenv "SHELL")))))
|
||||
(shell-init-file (cond
|
||||
((s-equals? "zsh" shell) ".zshrc")
|
||||
((s-equals? "bash" shell) ".bashrc")
|
||||
(t (error "Unknown shell")))))
|
||||
(find-file-other-window (expand-file-name shell-init-file (getenv "HOME")))))
|
||||
|
||||
(provide 'prelude-core)
|
||||
;;; prelude-core.el ends here
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
(define-key map (kbd "C-c +") 'prelude-increment-integer-at-point)
|
||||
(define-key map (kbd "C-c -") 'prelude-decrement-integer-at-point)
|
||||
(define-key map (kbd "C-c I") 'prelude-find-user-init-file)
|
||||
(define-key map (kbd "C-c S") 'prelude-find-shell-init-file)
|
||||
;; make some use of the Super key
|
||||
(define-key map [?\s-d] 'projectile-find-dir)
|
||||
(define-key map [?\s-p] 'projectile-switch-project)
|
||||
|
|
Loading…
Reference in a new issue