mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-11 19:23:47 -05:00
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.