I am using spacemacs nXML mode to edit build.xml (java ant configuration file), the file is very long, how to fold and unfold it?
You need to add this hook:
(add-hook 'nxml-mode-hook 'hs-minor-mode)
After that put this in your init.el file or somewhere it'll be loaded.
(define-key nxml-mode-map (kbd "C-c h") 'hs-toggle-hiding)
If you now press
C-c h it will fold the xml at the element where your cursor is.