Unfortunately foldmarker
does not allow regex matching, as specified by :h fmr
. Therefore it will only match a literal string, so there's no way getting around the a = '{1}'
in your example. However, it seems like what you really want is
// vim: set fdm=syntax fdls=1 :
with
let javaScript_fold=1
in your ~/.vimrc
.