69
22
In Vim, if I'm typing a comment in a code file, and I hit Enter, it automatically makes the newline a comment, too.
For instance, in a Ruby file:
# I manually typed the pound at the start of this line and hit enter.
# This line formatted itself this way automatically.
Generally, this is what I want, but not always. How can I temporarily turn off this auto-commenting behavior?
I've seen it elsewhere but I'll add it here: "Whoever thought this was a good idea as a default should have their fingers broken." – user1683793 – 2019-12-16T18:57:12.350
By temporarily, do you want a a command that does it a single time, or set some option that will last for a few commands until you turn it back on? Possible cross site duplicate: http://stackoverflow.com/questions/4896003/how-do-i-stop-vim-from-auto-creating-comments-on-enter-press
– Ciro Santilli 新疆改造中心法轮功六四事件 – 2014-01-22T09:34:59.257