Add ranger control contrib module

This commit is contained in:
Tristan Hume 2014-10-26 11:10:57 -04:00 committed by syl20bnr
parent 8cd55cf43b
commit db51aab56e
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,2 @@
(evil-leader/set-key
"pc" 'ranger-control/projectile-cd)

View file

@ -0,0 +1,12 @@
(defun ranger-control/cd-tab (path)
(start-process "ranger-control-curl" nil "curl" "-X" "POST" "--data" path
"--connect-timeout" "0.1" "http://localhost:5964/cdtab-e"))
(defun ranger-control/kill-result-buffer (status)
"Kill the buffer returned by `url-retrieve'."
(kill-buffer (current-buffer)))
(defun ranger-control/projectile-cd ()
(interactive)
(use-package projectile :init
(ranger-control/cd-tab (projectile-project-root))))