Skip to content

Commit

Permalink
Extremely promising direction for recording the keystrokes. EOM
Browse files Browse the repository at this point in the history
  • Loading branch information
timvisher committed Nov 18, 2011
1 parent 624df7d commit 36d569d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions emacs/vimgolf.el
Expand Up @@ -97,6 +97,7 @@ with `C-c C-v` prefixes to help in playing VimGolf.
(defvar vimgolf-work-buffer-name "*vimgolf-work*")
(defvar vimgolf-start-buffer-name "*vimgolf-start*")
(defvar vimgolf-end-buffer-name "*vimgolf-end*")
(defvar vimgolf-keystrokes-buffer-name "*vimgolf-keystrokes*")

(defun point-min-in-buffer (buffer)
(with-current-buffer buffer
Expand Down Expand Up @@ -125,6 +126,17 @@ with `C-c C-v` prefixes to help in playing VimGolf.
(message "Wrong!")
(vimgolf-diff))

(defun vimgolf-capture-keystroke ()
(with-current-buffer (get-buffer-create vimgolf-keystrokes-buffer-name)
(end-of-buffer)
(insert (princ (mapconcat 'single-key-description
(this-command-keys-vector)
" ")))
(insert " ")))

;; (add-hook 'post-command-hook 'vimgolf-capture-keystroke)
;; (remove-hook 'post-command-hook 'vimgolf-capture-keystroke)

(defun vimgolf-parse-dribble-file (file)
(with-current-buffer (find-file-noselect file)
(beginning-of-buffer)
Expand Down

0 comments on commit 36d569d

Please sign in to comment.