A hydra for js2-refactor in emacs

July 7, 2017 ยท View on GitHub

(defhydra js2-refactor-hydra (:color blue :hint nil) " ^Functions^ ^Variables^ ^Buffer^ ^sexp^ ^Debugging^

[lp] Localize Parameter [ev] Extract variable [wi] Wrap buffer in IIFE [k] js2 kill [lt] log this [ef] Extract function [iv] Inline variable [ig] Inject global in IIFE [ss] split string [dt] debug this [ip] Introduce parameter [rv] Rename variable [ee] Expand node at point [sl] forward slurp [em] Extract method [vt] Var to this [cc] Contract node at point [ba] forward barf [ao] Arguments to object [sv] Split var decl. [uw] unwrap [tf] Toggle fun exp and decl [ag] Add var to globals [ta] Toggle fun expr and => [ti] Ternary to if [q] quit" ("ee" js2r-expand-node-at-point) ("cc" js2r-contract-node-at-point) ("ef" js2r-extract-function) ("em" js2r-extract-method) ("tf" js2r-toggle-function-expression-and-declaration) ("ta" js2r-toggle-arrow-function-and-expression) ("ip" js2r-introduce-parameter) ("lp" js2r-localize-parameter) ("wi" js2r-wrap-buffer-in-iife) ("ig" js2r-inject-global-in-iife) ("ag" js2r-add-to-globals-annotation) ("ev" js2r-extract-var) ("iv" js2r-inline-var) ("rv" js2r-rename-var) ("vt" js2r-var-to-this) ("ao" js2r-arguments-to-object) ("ti" js2r-ternary-to-if) ("sv" js2r-split-var-declaration) ("ss" js2r-split-string) ("uw" js2r-unwrap) ("lt" js2r-log-this) ("dt" js2r-debug-this) ("sl" js2r-forward-slurp) ("ba" js2r-forward-barf) ("k" js2r-kill) ("q" nil) )