summaryrefslogtreecommitdiff
path: root/evil-collection-debug.el
diff options
context:
space:
mode:
authorJames Nguyen <james@jojojames.com>2017-12-06 17:41:09 -0800
committerJames Nguyen <james@jojojames.com>2017-12-06 17:50:37 -0800
commit9eb7d3db0d4b7ffbc6ea6c137b0f2ec21f907d53 (patch)
treefee440d522a6270fca6b4989f654e10da8d293a1 /evil-collection-debug.el
parent4992d5fb0fd310d73ddc8a8301120552eb9a136f (diff)
Change namespace to evil-collection
Diffstat (limited to 'evil-collection-debug.el')
-rw-r--r--evil-collection-debug.el63
1 files changed, 63 insertions, 0 deletions
diff --git a/evil-collection-debug.el b/evil-collection-debug.el
new file mode 100644
index 0000000..8d21ceb
--- /dev/null
+++ b/evil-collection-debug.el
@@ -0,0 +1,63 @@
+;;; evil-collection-debug.el --- Evil bindings for the debugger -*- lexical-binding: t -*-
+
+;; Copyright (C) 2017 Pierre Neidhardt
+
+;; Author: Pierre Neidhardt <ambrevar@gmail.com>
+;; Maintainer: James Nguyen <james@jojojames.com>
+;; Pierre Neidhardt <ambrevar@gmail.com>
+;; URL: https://github.com/jojojames/evil-collection
+;; Version: 0.0.1
+;; Package-Requires: ((emacs "25.1"))
+;; Keywords: evil, debug, tools
+
+;; This file is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published
+;; by the Free Software Foundation; either version 3, or (at your
+;; option) any later version.
+;;
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; For a full copy of the GNU General Public License
+;; see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;; Evil bindings for the debugger.
+
+;;; Code:
+
+(require 'evil)
+(require 'debug)
+
+(defun evil-collection-debug-setup ()
+ "Set up `evil' bindings for `debug'."
+ (evil-set-initial-state 'debugger-mode 'motion)
+
+ (evil-define-key 'motion debugger-mode-map
+ ;; motion
+ (kbd "<tab>") 'forward-button
+ (kbd "S-<tab>") 'backward-button
+ (kbd "<return>") 'debug-help-follow
+ (kbd "SPC") 'next-line
+
+ "R" 'debugger-record-expression
+ "c" 'debugger-continue
+ "d" 'debugger-step-through
+ "x" 'debugger-eval-expression
+ "J" 'debugger-jump
+
+ "gl" 'debugger-list-functions
+ "gb" 'debugger-frame
+ "r" 'debugger-return-value
+ "u" 'debugger-frame-clear
+ "p" 'debugger-toggle-locals
+
+ ;; quit
+ "q" 'top-level
+ "ZQ" 'evil-quit
+ "ZZ" 'top-level))
+
+(provide 'evil-collection-debug)
+;;; evil-collection-debug.el ends here