Skip to content

Undocumented development tips and tricks

sdondley edited this page Dec 12, 2017 · 3 revisions

Some tips and tricks you won't find in the official documentation that can make your Dancer2 development process more joyful.

Get vim to fold on Dancer2 route handlers

If you use the vim text editor and its subroutine folding feature, you may notice your route handlers may not fold. To get them to fold, add the following line to your .vimrc file:

let g:perl_fold_anonymous_subs = 1

Be sure to reload any open files in vim to make the change take effect: :source <path_to_.vimrc>

Clone this wiki locally