4

I would like to bind j to reftex-toc-next and k to reftex-toc-previous whilst in a reftex-toc buffer. According to the documentation, the keymap active in *toc* buffers is reftex-toc-map. I'm using use-package to load reftex, so I've tried

(use-package reftex
  :ensure t
  :after (latex)
  :bind (:map reftex-toc-map
              ("j" . reftex-toc-next)
              ("k" . reftex-toc-previous))
  :config
  (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
  (setq reftex-plug-into-AUCTeX t))

Which produces the following error

Error (use-package): reftex/:catch: Symbol's value as variable is void: reftex-toc-map

Any suggestions as to why this doesn't work and how I can resolve it?

Drew
  • 75,699
  • 9
  • 109
  • 225
red
  • 53
  • 4

1 Answers1

3

I faced this exact problem and solved it by using evil-collection just on refTeX. Installed it as an additional package in my dotspacemacs/layers()

(setq-default
  ...
  dotspacemacs-addtional-packages
  '(...
    evil-collection
    ...)
 ...
 )

And initialised it only for refTeX in my user-config() through

(evil-collection-init 'reftex)
arifer
  • 31
  • 2