问题
I am using RubyMine 6.3.2. When I type the following line and press return/enter:
# This is a comment.
the editor inserts additional text, resulting in:
# This is a comment.after() do
end
I understand that this happens because "aft" is the first item on the dropdown that appears after typing ".". I can preventing the insertion by pressing space after return/enter, but that adds a space to the end of the line, and I have to remember to do it.
Is there a way to disable code completion within comments?
回答1:
It is a bug: http://youtrack.jetbrains.com/issue/RUBY-15127 It was fixed in 6.3.3, which was released yesterday: http://blog.jetbrains.com/ruby/2014/06/rubymine-6-3-3-rspec-3-code-insight-other-fixes/
This duplicate bug report http://youtrack.jetbrains.com/issue/RUBY-15195 gives a workaround, which is to go to RubyMine's registry (Control-Shift-A and type "registry") and uncheck "show.live.templates.in.completion". That works, and it revealed to me the existence of RubyMine's registry, so that's cool.
来源:https://stackoverflow.com/questions/24318226/how-to-disable-rubymine-code-completion-after-comment-line-ending-in-period