I have started using Vim for my C(++) programming. But I have 1 problem. Is there any way, how to add the header template to the every file I save (if it weren’t added)? The adding of the header works only with creating the a new file for now.
Share
Have something like this in your .vimrc:
This will insert the header on every save if one is not there yet, so that’s not very efficient. It’s better to write a script to search for files that have no header and insert one rather than checking it every time you save changes to the file.