diff --git a/contrib/restclient/README.md b/contrib/restclient/README.md new file mode 100644 index 000000000..5ba4d8d71 --- /dev/null +++ b/contrib/restclient/README.md @@ -0,0 +1,18 @@ +# Restclient contribution layer + +## What is this? +This is a package that lets you have a REPL-like interface +for http requests. Full documentation and examples can be found in the +package's [GitHub Page](https://github.com/pashky/restclient.el). + +Also there is an [Emacs Rocks!](http://emacsrocks.com/e15.html) episode of it. + +## Keybindings + +| Key Binding | Description | +|------------------------------------|------------------------------------------------------------------------------------| +| SPC m s | Send and stay in window (pretty-print response if possible) | +| SPC m S | Send and switch window (pretty-print response if possible) | +| SPC m r | Send and stay in window (do not attempt to pretty-print) | +| SPC m R | Send and switch window (do not attempt to pretty-print) | + diff --git a/contrib/restclient/packages.el b/contrib/restclient/packages.el new file mode 100644 index 000000000..35caad472 --- /dev/null +++ b/contrib/restclient/packages.el @@ -0,0 +1,25 @@ +(defvar restclient-packages + '( + restclient + ) + ) + +(defun restclient/init-restclient () + (use-package restclient + :mode ("\\.http\\'" . restclient-mode) + :defer t + :init + (progn + + (defun restclient-http-send-current-raw-stay-in-window () + (interactive) + (restclient-http-send-current t t)) + + (evil-leader/set-key-for-mode 'restclient-mode + "ms" 'restclient-http-send-current-stay-in-window + "mS" 'restclient-http-send-current + "mr" 'restclient-http-send-current-raw-stay-in-window + "mR" 'restclient-http-send-current-raw + )) + ) + )