evil mode - emacs, narrow-to-defun, hs-show-block -
this question has answer here:
i have defined following:
(defun narrow-into [] (narrow-to-defun) (hs-show-block)) (define-key evil-normal-state-map (kbd "zi") 'narrow-into)
my goal
the goal can open file, hit "zi", , (1) narrow current defn , (2) open editing.
my problem
when try run it, "wrong type argument: commandp, narrow-into"
question
what doing wrong , how fix it?
you need declare function interactive if want call interactively. explains error getting. other that, brackets should parens:
(defun narrow-into () (interactive) (narrow-to-defun) (hs-show-block))
Comments
Post a Comment