Orange-001 / region-generator

MIT License
2 stars 1 forks source link

Performance optimization: get comment type #2

Open lethefrost opened 4 months ago

lethefrost commented 4 months ago

Hi there, the idea of getting comment style by running the built-in comment command is cool and smart! It helps to generalize the scope of applicable languages, without needing to manually specify for each of them. However, the current algorithm is a little clumsy - it doesn't have to comment all the selected lines - it gets slow when the selection spans a large range covering many lines.

I am working on a solution as described in #1 , please let me know if you are willing to accept pull request 😊

lethefrost commented 4 months ago

We can also use this cool idea - utilizing editor.action.commentLine - to eliminate the existing manually engineered & hard coded types in the current version.