1

I have a multiline comment snippet that I would like to enable auto-fill-mode for while inside it, but then disable auto-fill-mode when I exit. Is this possible?

I tried adding a hook but was not able to get it to run properly. I aslo tried adding the statement in backticks but that had no effect other than outputting auto-fill-mode into the rendered snippet.

# -*- mode: snippet -*-
# name: Comment Block
# key: comm-block
# expand-env: ((yas-before-expand-snippet-hook '(funcall (lambda () auto-fill-mode))))
# --
/*
 * ${1:Comment}
 */
$0

Any ideas?

Drew
  • 29,895
  • 7
  • 74
  • 104
aaron.cimolini
  • 123
  • 1
  • 6

0 Answers0