5

I tried many different folding plugins for Emacs and ended up using folding-mode as I used Vim's folding marks and so my files contain a large number of folding marks. I am currently in the process of switching from Vim to Emacs (evil-mode).

However, I miss that my file is fully folded when I open it. Does anyone know how to force folding-mode to fold everything when opening a file?

My init file contains:

;; folding-mode
(load "folding" 'nomessage 'noerror)
(folding-add-to-marks-list 'ess-mode "/*{{{*/"  "/*}}}*/"  nil t)
(folding-mode-add-find-file-hook)
(add-hook 'ess-mode-hook 'folding-mode)
(evil-leader/set-key "ff" 'folding-toggle-show-hide)
3

Folding-mode will automatically fold files when opened if you call (folding-mode-add-find-file-hook) in your init file.

The documentation, however, seems wrong. It says that you need to specify a file-local variable, but testing suggests that this is not needed.

  • I made an edit and put the folding-mode part of my emacs init file into the question. As you can see the option is already included. Still no automatic folding happening. – cataclysmic Nov 11 '15 at 17:26
  • 2
    Ah ok, I found my error. The order of my options was incorrect. Now it is working. – cataclysmic Nov 11 '15 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.