snapdragon3101's blog

By snapdragon3101, history, 7 weeks ago, In English,

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 ;-)

Dark theme

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

Dependency Updates

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

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)

Auto Save

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

Kill Switch

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)

Updater

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

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

 
 
 
 
  • Vote: I like it
  • +140
  • Vote: I do not like it

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by snapdragon3101 (previous revision, new revision, compare).

»
7 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

Great job! I'll try out the new version soon. I appreciate your work on the editor and hope you persist doing that.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Have you seen QScintilla?

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

The editor automatically adds a newline whenever I type '{'. This makes life difficult when dealing with pairs, as we cannot use list-initializer. pair p= {a,b}; map[{a,b}]=c; vector.push_back({a,b}); func({a,b});

Everything else is great. I used the previous version for a week. Thanks for adding the bracket matching feature and kill switch. The new dark theme is beautiful.

Please fix '{' issue in your next version. Thank you.

»
7 weeks ago, # |
Rev. 2   Vote: I like it -8 Vote: I do not like it

i dont know if this is intended or a bug but when using double quotes it automatically types another one but does not skip the closing double quote when you end typing your string.

Example: (pretend | is the cursor)

"|"
"Hello World|"
"Hello World"|""

You basically end up with extra double quotes at the back.

Also single quotes have no auto completion.

But good job with the new editor. Keep it up :)

»
7 weeks ago, # |
Rev. 9   Vote: I like it +3 Vote: I do not like it

Need an option for key binding and stuff. For example I use Ctrl+Enter a lot on CodeBlock the cursor goes to the end of the line but it failed here ? And another option for multi-tab will be much more comfortable for me.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    So let me know the keybindings in the reply to this comment Keybindings for

    • Compile
    • Run
    • Compile and Run

    Since, I don't use F* bindings, I have no idea what is the standard binding.

    Also, for others Do not worry, Current binding will not go anywhere, In Settings you could change the binding. I will name the above binding like "Use FnKey Bindings"

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

It would be amazing with a vim emulator.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you add keyboard shortcut in next version of the editor? I can just press F9 to run instead of press Ctrl + Shift + R.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you friend snapdragon3101 make it possible saving the program with the test case/input file also? I mean If I sometimes open the code it will show the input test cases as well as the code also. You Know Dude it will be fun then doing :p

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by snapdragon3101 (previous revision, new revision, compare).

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

After installing in windows,when i am opening the editor, i am receiving an error -

THE CODE EXECUTION CANNOT PROCEED BECAUSE VCRUNTIME140_1.dll WAS NOT FOUND REINSTALLING THE PROGRAM MAY FIX THIS PROBLEM.

I tried reinstalling but the error persists.Can you please help?

»
7 weeks ago, # |
Rev. 4   Vote: I like it +14 Vote: I do not like it

Great job! This looks good now.

Some suggestions.

  • Please, please, please put the compiled executable in the same folder as the source file, or at least let us choose where it should be. It shouldn't be in the AppData folder. Any decent antivirus scans just-made executables, so every time I compile it scans the .exe, which means I have to wait 10 seconds before it can actually run. Every single time I compile. The thing is, you can add an exception in the antivirus, but I'd prefer not adding an exception in my damn AppData folder! So please, put the .exe in the same folder as the source file.

  • Add an option for tab length. Most people that use tabs use 4-length, not 8-length which is the current unchangeable setting.

  • It's a bit annoying that typing { immediately puts a newline. Please, add an option to disable it.

  • The logo is unrecognizable on a black background. At least add a white outline.

Great work!

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You have summarized every request nicely.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The new release 2.0.3 has a new logo. Rest is coming soon.

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    All things are done in version higher than 3.2.0

    However, the temporary binary is still produced in temp directory. Don't be afraid to add it to exception in anti-virus! Of all the places for virus to hide. Temp will be most unlikely candidate as this directory is deleted most frequently!

  • »
    »
    5 days ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    I'll be working on "Put the compiled executable in the same folder as the source file" these days, you can track it here.

    I believe it can be done in 1~3 days.

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you do multi-line comment on the next version ?

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hello ! I installed this editor, it looks very good, but unfortunately i'm unable to get it working.

First i was getting the error- " Format command was not valid" Then i installed clang-format.

Now when i click compile and run the screen is stuck on this

Screenshots :

  • »
    »
    4 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    You can ignore the Formatter error, if you don't want to use format command. if it is stuck, it likely means that you have infinite loop that prevents program from returning. The Output will not be produced unless your program terminates. Try Killing them from Actions => Kill Process or (CTRL+K).

    Re-using is shown when you click, Run not when you press Compile and Run

    • »
      »
      »
      4 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Okay I finally got it working ! :)

      Thanks for this awesome software ! Hope to see awesome updates along the way :)

»
4 days ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I am getting an error which says:
The program can't start because MSVCP140.dll is missing from your computer. Try reinstalling the program to fix this problem.
Even reinstalling it didn't fix the error. How do I fix it?

  • »
    »
    4 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You need to install Microsoft runtime. Please find the url of same on GitHub Readme in FAQ section.

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Is there a problem with indentation as whenever I open the braces and press enter, the cursor does not indent after the braces and I have to press tab. This does not happen once but for every statement, I need to use tab for proper indentation. Also,it would be great if there was a feature for autocomplete

  • »
    »
    99 minutes ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    All issues related to the text editor are work in process.