" TODO Create fold markers based on cmake syntax, eg.
"
"   if() <- open
"   endif() <- close
"
"   foreach() <- open
"   endforeach() <- close
"
" and so on for all other begin end style command pairs.
"
" Then change the setting.
"
"   setlocal foldmethod=syntax
setlocal foldmethod=indent
" Set comment string
setlocal commentstring=#%s

" Custon surround for creating a CMake variable from a text object.
" "ys{motion}v" makes a variable out of "<text-obj>" - > "${<text-obj>}"
let b:surround_{char2nr("v")} = "${\r}"