Skip to content

Instantly share code, notes, and snippets.

@herbertjones
herbertjones / gist:4ceaac254bd620c28e51
Created February 21, 2015 22:07
Git timemachine micro state
(evil-leader/set-key
"gt" nil
"gt" 'spacemacs/time-machine-micro-state)
(spacemacs|define-micro-state time-machine
:doc "[q] quit [p] previous [n] next [c] current"
:on-enter (git-timemachine)
:on-exit (git-timemachine-quit)
:persistent t
:bindings
@herbertjones
herbertjones / gist:378d3c7bc258d7f5bf1e
Created February 21, 2015 20:31
Playing with a spacemacs-like scrolling micro state and new syntax
(spacemacs|define-micro-state scroll
:doc "[,] page down [.] page up "
:bindings
("," evil-scroll-page-down)
("." evil-scroll-page-up))
(evil-leader/set-key
"," '(lambda (x)
(interactive "p")
(evil-scroll-page-down x)
@herbertjones
herbertjones / gist:2cfb738e81a6f15c6983
Created February 21, 2015 20:30
Playing with a spacemacs-like scrolling micro state and new syntax
;; New syntax
(spacemacs|define-micro-state scroll
:doc "[,] page down [.] page up "
:bindings
("," evil-scroll-page-down)
("." evil-scroll-page-up))
(evil-leader/set-key
"," '(lambda (x)
@herbertjones
herbertjones / gist:c4fca060e531fdfd5828
Last active August 29, 2015 14:15
Playing with a spacemacs-like scrolling micro state
;; Old syntax
(evil-leader/set-key
"," 'hfj/scroll-page-down
"." 'hfj/scroll-page-up
)
(defun hfj/scroll-page-overlay-map ()
"Set a temporary overlay map to easily scroll through a file."
(set-temporary-overlay-map