Author Topic: new idea: smart copy of the code snippet with [code] tag around  (Read 5156 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Under my web browser, I have an addon named: Link Text and Location Copier

With this add on, I can copy the link with many kinds of format, such as: wikipedia link format, or makdown link format or phpBB link format.

I think we can have a similar function, when you copy a piece of the code in the editor, we can got the result like:

Code
In the source file: xxxx/yyyy.cpp
code tag begin

The code content.

code tag end

Any ideas? Or maybe we already have this feature?
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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: new idea: smart copy of the code snippet with [code] tag around
« Reply #1 on: April 12, 2024, 07:17:40 am »
That's a great idea! There isn't a universally built-in feature for copying code with context like your browser extension does for links. Exploring these options should help you achieve the desired code copy functionality in your editor.

Are you an AI bot?

I will report it to moderator.
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.