-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from trishume/ranger-control
MacRanger Control Contrib Module
- Loading branch information
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Ranger Control | ||
|
||
This module hooks into the command server in MacRanger to add the command `<SPC> p d` | ||
which adds a special `e` tab in ranger that is in the current projectile directory. | ||
|
||
Currently this functionality only works with MacRanger but I plan on making it a plugin | ||
that anyone can install into their ranger. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(evil-leader/set-key | ||
"pc" 'ranger-control/projectile-cd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)))) |