Add few custom functions and shortcuts in spacemacs

This commit is contained in:
Thomas Dehaeze 2019-07-20 16:29:54 +02:00
parent baa17c8f2a
commit 4a8a584a8c

View File

@ -1398,6 +1398,26 @@ Org simply =C-c l= to store the link to the email and then =C-c C-l= and paste t
(spacemacs/set-leader-keys "os" 'eshell)
#+END_SRC
*** Open terminal in current directory
#+BEGIN_SRC emacs-lisp
(defun open-terminal-in-workdir ()
(interactive)
(call-process-shell-command
(concat "termite --directory=" default-directory) nil 0))
(spacemacs/set-leader-keys "ot" 'open-terminal-in-workdir)
#+END_SRC
*** Open ranger in current directory
#+BEGIN_SRC emacs-lisp
(defun open-ranger-in-workdir ()
(interactive)
(call-process-shell-command
(concat "termite --directory=" default-directory " --exec=ranger") nil 0))
(spacemacs/set-leader-keys "oo" 'open-ranger-in-workdir)
#+END_SRC
** Path for Shell
#+BEGIN_SRC emacs-lisp
(when (memq window-system '(mac ns x))