From 4a8a584a8c37c74a29d4a1a37e83e76f2e8b9441 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Sat, 20 Jul 2019 16:29:54 +0200 Subject: [PATCH] Add few custom functions and shortcuts in spacemacs --- dotfiles/spacemacs.org | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dotfiles/spacemacs.org b/dotfiles/spacemacs.org index 39b4e08..43ed3c5 100644 --- a/dotfiles/spacemacs.org +++ b/dotfiles/spacemacs.org @@ -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))