Would be helpful to have a snapcraft ignore file

I’m going through the Create your first snap - Tutorials - Ubuntu Community Hub and using gvim when I run


I get

The 'snap' directory is meant specifically for snapcraft, but it contains the following non-snapcraft-related paths, which is unsupported and will cause unexpected behavior:
- .snapcraft.yaml.swp

It would help if you could specify an ‘ignore’ file to list filename patterns to ignore

The .swp file is caused by interruption of gvim (e.g. CTRL-Z), that leaves the file in a state where latest changes (the buffer) is not saved. Having a .swp file in that directory arguably requires attention to have it removed and the integrity of the yaml restored, and ignoring it would introduce risk and possibly unexpected results.