Replies: 9 comments
-
I'm wondering what these programs are. Can you give some examples? It sounds like code formatting. |
Beta Was this translation helpful? Give feedback.
-
okay so for example, I have a CLI program that takes source code file path as command-line argument and then add the date/time/my location, etc to the source code in the beginning, using some regex. Now I kind of want to use the same program with CP Editor, actually, the possibilities are endless, but if we can configure some functionality like this it'll be very cool. For now, as a hack, I created a wrapper around the cf tool, so when cp editor sends parameters to cf tool, it is actually sending to my wrapper application, and then the wrapper does the extra thing I want and forwards the same parameter to the actual cf tool. But its very inefficient, and time taking. But it's a hack fix after all. |
Beta Was this translation helpful? Give feedback.
-
If you want to add date/time and your location or anything else to the beginning of your source file (like your location, assuming it doesn't changes often). You can customise the header comment from You can read the docs here. For this, you should be using latest beta (v6.6) of CP Editor. It only works if your problem is parsed from Competitive Companion. #671 requests exactly what you describe and will enable more functionality to code templates.
I think, modifying the CP Editor's source and building for your need would have been much easier and cleaner. You could possibly also propose it as PR. |
Beta Was this translation helpful? Give feedback.
-
If "plugin" is only "run a program, use source code, etc. as arguments, replace the source code with the output of the program", then it's possible and we could work on it. However, the priority may depend on actual use cases. However, it's hard to provide a plugin system like Sublime, VS Code, etc. |
Beta Was this translation helpful? Give feedback.
-
Given a source code, there isn't much a program could do except some search and replace or preprocessing. A plugin is generally something that should add or extend CP Editor functionalities, and it needs very fine control over cpeditor in order to do so.
Agree, plugin system is hard to implement, plus it needs a well thought out architecture and there are many more things that go in Plugin Architecture. |
Beta Was this translation helpful? Give feedback.
-
I will tell you my exact use case. I actually don't like to have lots of macros and stuff in my code, so in sublime I created a plugin that takes my source code, attaches all macros, and then compiles it, so it gives an illusion of using macros without actually defining it in the code. I also submit the code like that and it attaches macros behind the scenes (I store all macros in a separate file, I reads from it), this is one feature I love because it makes my code extremely clean and readable.
I would try this ! |
Beta Was this translation helpful? Give feedback.
-
If my understanding is correct, you don't like seeing lots of macros when coding? Personally, I use lots of white spaces to move my template outside of the screen. (Actually, many people thought this was in order to prevent hacking, but I never meant that.) |
Beta Was this translation helpful? Give feedback.
-
Exactly, for example, you would be able to successfully compile a program like this
It looks so clean and readable, it doesn't have those macros [
Yeah, it's okay to do that :P |
Beta Was this translation helpful? Give feedback.
-
This is moved back to #916. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
I was a sublime user before and I created some plugins that take code source do some stuff and sends it back. I really want to use them in CP Ed as well.
Describe the solution you'd like
Some hotkeys that can be assigned to some .exe files which take source code path as a parameter, and then it modifies the source code
Describe alternatives you've considered
I manage to create a hacky fix by creating a wrapper application for CF Tool and using it to do more than just submit, but its extremely complicated and not at all easy. So, I was really hoping for a feature where we can pass source path as a argument to some external executable files.
Additional context
Also, that hack is not working on my other laptop i get this message
If this feature comes into existance, i may be able to port some of the popular sublime/atom pulgins to CP Editor
Beta Was this translation helpful? Give feedback.
All reactions