I use foldmethod=marker in vim with default {{{ and }}} markers and zfcommand to fold/unfold visually selected blocks.It works fine in most file types, for example:/*{{{*/console.log(this is a javascript file)/*}}}*/<!--{{{--><p>This is a HTML file</p><!--}}}-->/*{{{*//* This is a css file *//*}}}*/#{{{echo this is a bash script#}}}Etc...But in SQL files, it uses common /* ... */ syntax which, at least for PostgreSQL is invalid.//{{{select 'This is a SQL file'//}}}I also use tcomment pluggin to comment in and out things with Ctrl+- Ctrl+- and it works well with SQL files too so I think it should be an issue with zf command itself or some configuration parameter which I doesn't know. But I don't know where to look for...For example:-- select 'This is a commented out query'Any clue or suggestion will be welcomed.
Comment out characters for zf
folding
As worked out in comments, solution is to set proper commentstring. The default is for sql file to commentstring=/*%s*/. So in this case you need to::set commentstring=--%sYou can automate it via autocmmand or by modeline:-- vim:set commentstring=--%s:.autocmd FileType sql set commentstring=--%s