Check : https://cpeditor.github.io
Hi Guys !
Around a week ago, I released the first version of CP Editor. If you are reading about CP Editor for first time. I request you to read my previous blog first.
Many user liked it and I got many suggestions about enhancements and some bug reports as well. I liked your over whelming response, it made me happy. Now it's time for me to make you happy.
Enough talking, let's get into what's new in CP Editor 2.0. It is a big release and hence a long blog ;-)
Last time there was a dark theme but it only made the editor dark. So, it wasn't truly dark theme. Now with this new release CP Editor packs a system-wide dark theme. Have a look here
Just like any other software, CP Editor also have a long acyclic dependencies, and over the weeks many were updated. So this Editor has most updated dependencies.
Fonts are important part of any editor. In the last editor it was not possible to change fonts. In this release you can change font, change font size and change font style. If you want some new font, Install the font to your computer and you can then use it inside the editor. Everything is saved and so your fonts won't change unless you explicitly change them. (requested by : m4xx)
I like auto-save feature and use it on all my editors. So in this release you have a option to enable this feature. Auto Save is performed every 5s. So forget
CTRL+S after enabling this feature. (requested by : samraj2k)
Python is supported
Python is also one of the most widely used language here at Codeforces and is generally used by everyone. Now, you can do all that you could do with C++. Write your few-liner python code and Hit
CTRL+R and check your output. Say Bye Bye to Python Interpreter CLI. Python is fully syntax highlighted also Python has Auto completion as well. For setup read here
Java is supported
Java is also supported. I didn't disappointed you Java Users. Due to design of Java, you have some restrictions like you have to name your class as
a and make it non-public. Syntax Highlighter of C++ is used for this Language so some keywords like
instanceof might not get highlighted correctly. In most cases, you won't even notice it. For setup read here
Output Box Clear Issue
If you run On Input1 and Input2, the Output1 and Output2 box would get value. If then you cleared Input2 and ran again the old values of Output2 would persist. This issue has been fixed in this release. (reported by : errorgorn)
Kill on Timeout
By default editor will now kill all process that would take more than 5 sec to complete. This feature comes in handy when your code is in infinite loop or anything that made your program hung up. The message box will report such kills. This however does not works on Windows due to dependency issue, But don't despair windows user. See next
CTRL+K will kill all running testcases. So if your program hang up. Now you have a nice and tidy way to kill it. The program is sent
SIGKILL and hence is bound to get
KILLED Immediately. Such process will likely report Non-Zero Exit Code. This was important, because if you keep those process running they would take CPU burst, making your system slow. (requested by : samraj2k)
stderr on Crash
Now, if your program crashed or assert failed. You would get such messages on the message box. You can use it to debug by printing stuff to stderr, if program exits abnormally, editor will show all the stderr contents on message box. If program was exited normally, the output box will also show stderr apart from stdout in red color. (requested by : errorgorn)
New Session had a bug
A new session is something that resets the state of the editor. Removing all buffers and creating editor like it was launched fresh. However this had a issue where if you opened a file and then after doing your stuff you started a new session, the old file was still kept open and could have been over-written by your new contents. It has been fixed
Bracket Matching and Open file name
Now, when your cursor is near a closing bracket, the corresponding opening bracket is highlighted. It looks beautiful in dark mode. See this. Also notice how the currently opened file Path is shown as title of the window. (requested by : ashiknur)
An Updater has been added that checks for newer releases of the editor after every launch of Editor. If a new release is available it will give you a hyperlink to download it. So you can be safe the updates are from me and you always have latest editor installed on your system. Its not annoying updates like Windows, it peacefully requests to update like Linux. See this
Open with CP Editor
Windows user can now set CP Editor as their default C++/Python/Java Editor. You can also open any text file in CP Editor by
Right click => Open with => Find and click CP Editor.exe. Mark Always if you want to set it as default for file association. In some cases windows might not show CP Editor.exe as candidate for Opening Files, in such case use Let me choose and browse to installation directory and click CP Editor.exe
Fixed File Saving
As reported by many, the editor was not able to save a new file. It always saved a null file. This issue has been fixed in this release. (reported by : ashiknur)
Detached Mode of Execution
I was aware that in interactive problems this editor will be useless, So this new release has a execution mode called "Detached Execution", You can also run in detach mode by
CTRL+Shift+D. When running in detached mode, your process/program is not controlled by Editor. Hence it opens and runs your program in
cmd.exe. Here you can interactively put your input. Make sure to pause program, otherwise detached mode closes as soon as your program returns. Detached mode works for all languages. On UNIX you will need to have
xterm installed for it to work.
Linux AppImages fixed
Due to a higher version of Linux (I use Arch) that i used to pack the editor, those with lower
glibc were unable to run the application. It has been fixed, now I am including the
glibc inside of AppImage, this increases the size of the App, but Small price to pay for Salvation.
Beta and Nightly
Help => Use Beta will enable you to get update notifications for Beta releases of application. This channel is updated every day. So turn this feature if you want to use and be on bleeding edge of CP Editor releases.
Download from here : https://github.com/coder3101/cp-editor2/releases
Source Code : https://github.com/coder3101/cp-editor2
Please give stars to the project
EDIT (Update 2.0.2 is available)
- Fixed bug where New Session would not clear the output and input box.
- Fixed Updater, Always showing an Update
- Window size is now restored from last session.
- Added Option to replace tabs with Spaces.
- Editor now shows compiler Warnings.
- Fixed File was not saved unless Editor was closed.
EDIT 2 (Update 2.0.3 is available)
- A new better contrast icon
- Fixed an Issue where Compiler showed Empty Warning
- Fixed Flashing of Command Window, when You Launch/Update Settings.
- Added, Editor will save your file as soon as you Hit Compile or Run and Compile.
- Fixed, Window not being restored correctly upon re-launch.
You should have already got an update notification, otherwise use the above link