Author Topic: Abbreviation plugin (auto completion) CTRL+J does not work under comments  (Read 3343 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Hi, when I try to enter some date information in the comment, I try to press "CTRL+J" key, and I see nothing happens if the caret is inside a comment.

It works OK if the caret is in a normal code fields.

I think it is very common if some one want to add date information in the comments. Can you reproduce this bug?

Any ideas?

Thanks.


PS:
I see there are two ways to use the "Abbreviation plugin", first I type the "now", and after that, I press the "CTRL+J", and the "now" becomes the actual date+time text string.

The other way is that I press the "CTRL+J", and a suggestion list is pop up, and I continuously type the "now", and hit the enter, the actual date+time string is entered in the editor.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2808
Hi, when I try to enter some date information in the comment, I try to press "CTRL+J" key, and I see nothing happens if the caret is inside a comment.

It works OK if the caret is in a normal code fields.

I think it is very common if some one want to add date information in the comments. Can you reproduce this bug?

Any ideas?

Thanks.


PS:
I see there are two ways to use the "Abbreviation plugin", first I type the "now", and after that, I press the "CTRL+J", and the "now" becomes the actual date+time text string.

The other way is that I press the "CTRL+J", and a suggestion list is pop up, and I continuously type the "now", and hit the enter, the actual date+time string is entered in the editor.
Great find ! I didn't know that either.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Maybe, some day, we need to publish some video tutorial about how to use those plugins.

Any way, it looks like currently, Abbreviation plugins works inside the C++ comments now, so I'm not sure why it did not work yesterday.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.