summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Nguyen <james@jojojames.com>2018-01-11 19:26:08 -0800
committerJames Nguyen <james@jojojames.com>2018-01-11 19:26:08 -0800
commit7bf7363865e598376aa23b14c50ae3ea9f440bf5 (patch)
treed883a36861811fcc54b5170e86ee264e101afc1f
parent833d0596e7336cdbd86831b4232d3516bfb3e203 (diff)
Add debugging rationale and support for some modes
Tweaked edebug
-rw-r--r--evil-collection-edebug.el4
-rw-r--r--evil-collection-indium.el15
-rw-r--r--evil-collection-realgud.el97
-rw-r--r--evil-collection.el1
-rw-r--r--readme.org22
5 files changed, 136 insertions, 3 deletions
diff --git a/evil-collection-edebug.el b/evil-collection-edebug.el
index 05c62cc..7e8c531 100644
--- a/evil-collection-edebug.el
+++ b/evil-collection-edebug.el
@@ -53,7 +53,7 @@
"C" 'edebug-Continue-fast-mode
"f" 'edebug-forward-sexp
- "gh" 'edebug-goto-here
+ "H" 'edebug-goto-here
"I" 'edebug-instrument-callee
"i" 'edebug-step-in
"o" 'edebug-step-out
@@ -73,7 +73,7 @@
;; evaluation
"r" 'edebug-previous-result
- "EE" 'edebug-eval-expression
+ "e" 'edebug-eval-expression
(kbd "C-x C-e") 'edebug-eval-last-sexp
"EL" 'edebug-visit-eval-list
diff --git a/evil-collection-indium.el b/evil-collection-indium.el
index 8a309fe..fc0159b 100644
--- a/evil-collection-indium.el
+++ b/evil-collection-indium.el
@@ -32,6 +32,21 @@
(defun evil-collection-indium-setup ()
"Set up `evil' bindings for `indium'."
+ (evil-define-key 'normal indium-debugger-mode-map
+ "n" 'indium-debugger-step-over
+ "i" 'indium-debugger-step-into
+ "o" 'indium-debugger-step-out
+ "c" 'indium-debugger-resume
+ "L" 'indium-debugger-locals
+ "s" 'indium-debugger-stack-frames
+ "q" 'indium-debugger-resume
+ "H" 'indium-debugger-here
+ "e" 'indium-debugger-evaluate
+ ">" 'indium-debugger-next-frame
+ "<" 'indium-debugger-previous-frame)
+
+ (add-hook 'indium-debugger-mode-hook #'evil-normalize-keymaps)
+
(evil-define-key 'normal indium-inspector-mode-map
(kbd "RET") 'indium-follow-link
[mouse-1] 'indium-follow-link
diff --git a/evil-collection-realgud.el b/evil-collection-realgud.el
new file mode 100644
index 0000000..47efc42
--- /dev/null
+++ b/evil-collection-realgud.el
@@ -0,0 +1,97 @@
+;;; evil-collection-realgud.el --- Bindings for `realgud'. -*- lexical-binding: t -*-
+
+;; Copyright (C) 2017 James Nguyen
+
+;; Author: James Nguyen <james@jojojames.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, emacs, tools, realgud
+
+;; This program 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 of the License, or
+;; (at your option) any later version.
+
+;; This program 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.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;; Bindings for `realgud'.
+(require 'evil)
+(require 'realgud nil t)
+
+;;; Code:
+(defun evil-collection-realgud-setup ()
+ "Set up `evil' bindings for `realgud'."
+ ;; This one is to represent `realgud-populate-src-buffer-map-plain'.
+ (evil-define-key 'normal realgud:shortkey-mode-map
+ "b" 'realgud:cmd-break
+ "u" 'realgud:cmd-delete
+ "X" 'realgud:cmd-clear
+ "-" 'realgud:cmd-disable
+ "+" 'realgud:cmd-enable
+ "T" 'realgud:cmd-backtrace
+ "f" 'realgud:cmd-finish
+ "n" 'realgud:cmd-next
+ "q" 'realgud:cmd-quit
+ "Q" 'realgud:cmd-kill
+ "r" 'realgud:cmd-restart
+ "R" 'realgud:cmd-restart
+ "s" 'realgud:cmd-step
+ "i" 'realgud:cmd-step
+ "!" 'realgud:cmd-shell
+
+ ;; (define-key map [M-down] 'realgud-track-hist-newer)
+ ;; (define-key map [M-kp-2] 'realgud-track-hist-newer)
+ ;; (define-key map [M-up] 'realgud-track-hist-older)
+ ;; (define-key map [M-kp-8] 'realgud-track-hist-older)
+ ;; (define-key map [M-kp-up] 'realgud-track-hist-older)
+ ;; (define-key map [M-kp-down] 'realgud-track-hist-newer)
+ ;; (define-key map [M-print] 'realgud-track-hist-older)
+ ;; (define-key map [M-S-down] 'realgud-track-hist-newest)
+ ;; (define-key map [M-S-up] 'realgud-track-hist-oldest)
+ )
+
+ (evil-define-key 'normal realgud:shortkey-mode-map
+ (kbd "C-x C-q") 'realgud-short-key-mode
+ "1" 'realgud-goto-arrow1
+ "2" 'realgud-goto-arrow2
+ "3" 'realgud-goto-arrow3
+ "4" 'realgud:goto-loc-hist-4
+ "5" 'realgud:goto-loc-hist-5
+ "6" 'realgud:goto-loc-hist-6
+ "7" 'realgud:goto-loc-hist-7
+ "8" 'realgud:goto-loc-hist-8
+ "9" 'realgud:goto-loc-hist-9
+ "b" 'realgud:cmd-break
+ "J" 'realgud:cmd-jump
+ "c" 'realgud:cmd-continue
+ "e" 'realgud:cmd-eval-dwim
+ "E" 'realgud:cmd-eval-at-point
+ "U" 'realgud:cmd-until
+ "H" 'realgud:cmd-until
+ [mouse-2] 'realgud:tooltip-eval
+ [left-fringe mouse-1] 'realgud-cmds--mouse-add-remove-bp
+ [left-margin mouse-1] 'realgud-cmds--mouse-add-remove-bp
+ ">" 'realgud:cmd-newer-frame
+ "<" 'realgud:cmd-older-frame
+ "gR" 'realgud-recenter-arrow ;; FIXME: Hmnn!
+ "C" 'realgud-window-cmd-undisturb-src
+ "g?" 'realgud:cmdbuf-info-describe
+ "S" 'realgud-window-src-undisturb-cmd
+ "R" 'realgud:cmd-restart
+ "gr" 'realgud:cmd-restart
+ "!" 'realgud:cmd-shell)
+
+ (add-hook 'realgud-short-key-mode-hook #'evil-normalize-keymaps))
+
+(provide 'evil-collection-realgud)
+;;; evil-collection-realgud.el ends here
diff --git a/evil-collection.el b/evil-collection.el
index 1dd11c8..d258912 100644
--- a/evil-collection.el
+++ b/evil-collection.el
@@ -111,6 +111,7 @@ or evil-collection.")
profiler
python
racer
+ realgud
rjsx-mode
robe
ruby-mode
diff --git a/readme.org b/readme.org
index 98876d5..02cd70e 100644
--- a/readme.org
+++ b/readme.org
@@ -354,7 +354,27 @@ definition".
- ~0~ has a somewhat intuitive meaning, plus it is next to ~+~ and ~-~ on QWERTY.
- ~=~ is useful as a synonym for ~+~ because it is the unshifted key of ~+~ on QWERTY.
-
+*** Debugging
+ When debugging is on, debugger keys takes the most precedence.
+
+ These keys will be set when there's an available command for them.
+
+ - ~n~ : Step Over
+ - ~i~ : Step Into
+ - ~o~ : Step Out
+ - ~c~ : Continue/Resume Execution
+ - ~L~ : Locals
+ - ~t~ : Tracing
+ - ~q~ : Quit Debugging
+ - ~H~ : Continue until Point
+ - ~e~ : Evaluate Expression
+ - ~b~ : Set Breakpoint
+ - ~u~ : Unset Breakpoint
+ - ~>~ : Navigate to Next Frame
+ - ~<~ : Navigate to Previous Frame
+ - ~g?~ : Help
+ - ~J~ : Jump to debugger location
+ - ~R~ : Restart
** Modes left behind