scrooloose/nerdcommenter — pull request #87 by inkarkat (2012-10-23 13:43:39+00:00)
Title: Avoid beep and additional space on insert-mode commenting at EOL.

When adding a comment at the end of a line (a common use when typing straight ahead) that only has a left part (like with ft=cpp, where the comment string is `//_`), there is an audible beep and an additional space character is inserted (yielding `//__`).

Suppress the attempted cursor move to the right (which fails in that case) via :silent!.
Use :startinsert! (with a bang) to continue editing at the end of the line instead of the workaround that inserts an additional space.