When using hideshow (specifically hs-hide-initial-comment-block
), I often run into the problem where the very first comment is a license block, followed by a more detailed comment on the purpose of the file.
For example:
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/**
- This file contains functions that solve problem W, part of API X.
- Take care not to do Y because it can cause issues with Z.
*/
As you might guess, I would like to fold only the first comment, but keep all other comments expanded since it's not part of the boiler plate license header.
Is there a way to tread blank lines as delimiters when hiding comments to avoid hiding multiple, unrelated comments at once?