Add few custom functions and shortcuts in spacemacs
This commit is contained in:
parent
baa17c8f2a
commit
4a8a584a8c
@ -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)
|
(spacemacs/set-leader-keys "os" 'eshell)
|
||||||
#+END_SRC
|
#+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
|
** Path for Shell
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(when (memq window-system '(mac ns x))
|
(when (memq window-system '(mac ns x))
|
||||||
|
Loading…
Reference in New Issue
Block a user