app-vim/gentoo-syntax and other *-syntax packages should include code to set commentstring. For example, many of the recognized file types are configuration files, so we should have setlocal commentstring =# %s Internally, vim only uses commentstring for code folding, but plugins can use it for more other reasons such as commenting and uncommenting code. Also, it's possible that there will be more built-in uses of commentstring in the future. It should be fairly trivial to set commentstring correctly for most kinds of files; I'd be more than happy to make the changes and submit a patch myself, though I might need some direction as to how to generate the actual patch. Steps to Reproduce: 1. $ vim /etc/make.conf 2. :set commentstring? [prints] commentstring=/*%s*/ Expected: [prints] commentstring=# %s
Generating patch files is relatively straightforward. One way, though by no means the only way, is to do as follows: mkdir ~/patches ~/patches/a ~/patches/b cp --preserve file1[ file2[ file3]] ~/patches/a/ # Modify the file(s) until you are happy with how they behave cp --preserve file1[ file2[ file3]] ~/patches/b/ cd ~/patches diff -r -u a/ b/ > my-changes.patch # Examine my-changes.patch to confirm that it modifies the files you want to change, and that no extraneous changes have crept in. If results are not as you wish, go back to "# Modify..." and try again. You may also find the vimdiff feature useful to let you observe differences and push changes between the two files in an interactive interface. If the files you are modifying are not at the root of the directory structure from their archive, try to recreate the corresponding directory structure in a/ and b/. For example, if you patch a file in ./after/syntax/ and another in ./after/filetype/, the ideal layout is to store the unchanged files in a/after/syntax/<file1> and a/after/filetype/<file2> and place the changed files in b/after/syntax/<file1> and b/after/filetype/<file2>. Be sure to clean out or move aside the 'a' and 'b' subdirectories when you are done, so that your second patch does not include changes from your first patch. The name you choose for your patch file will be visible when you attach the file here, so it would help if you name the patch files according to what they modify, such as gentoo-syntax-commentstring.patch, dhcpd-syntax-commentstring.patch, etc.
We approach the year mark and no one else has cared yet, interesting.
(In reply to comment #2) > We approach the year mark and no one else has cared yet, interesting. > I've since switched back to Ubuntu for unrelated reasons... and almost no one uses 'commentstring' anyway.