Jatana's blog

By Jatana, 2 years ago, In English,

TestManager

Hello, I would like to introduce the plugin FastOlympicCoding for Sublime Text.
It provides several useful features for competitive programming.

Test Manager
  • The main feature is test managing. You can effectively add, edit, and delete tests. See the screenshot above.
Debugger
  • Also for OSX, there is a debug functions.

Debugger

Class Completions
  • The next feature is class completions.
  • Write chars as classes for a template substitution.

ClassComplete

CppLint
  • C++ lint
  • Edit lint properties in settings.

CppLint

Stress Testing
  • You can stress test your program for finding test where it works incorrect.
  • This function requires a program that works correct and a test generator.
  • For further information see instructions on github

Stress


For the additional information and keybindings please visit the github page — https://github.com/Jatana/FastOlympicCoding

Installation
Contribution and Issues
  • Feel free to ask any question or express your ideas here or on github
 
 
 
 
  • Vote: I like it
  • +245
  • Vote: I do not like it

»
2 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Great job! As a Sublime Text user, I have to say thanks :)

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Amazing work will be very helpful if you can also provide something for java like this

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Make sure, that you can add any language in the settings. For example, there is already defined python.

    • »
      »
      »
      2 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      brother, I am new to sublime text and i didn't find how to make or configure my sublime text like yours , there are a whole lot of things there and I am now confuse though, can you please make a guide or a video that how to install fastolympicoding , and make my sublime text as above it shows in the picture

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Aren't autocompletion, linting and other IDE functions common plugins for many languages?

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Linting, debugging and completions are only for C++, other features are for all languages.

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      That's not what I'm talking about.

      I'm saying there were plugins doing these things long ago.

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it +5 Vote: I do not like it

        Yes, I agree that some functions have already in use.
        But, there are also innovative functions too.

»
2 years ago, # |
  Vote: I like it +13 Vote: I do not like it

I think the "Compile and Run" should save the file first then compile, as default compile options in sublime does.
Btw, how to change key bindings?

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Preferences-Browse Packages-CppFastOlympicCoding-Default (your os).sublime-keymap

    But, it changes to default with every plugin update.

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

It is not working for me on Ubuntu 18.04. When I compile (ctrl-alt-b) gives the following error:

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 993, in run_
    return self.run(edit, **args)
  File "/home/daniel/.config/sublime-text-3/Packages/FastOlympicCoding/test_manager.py", line 1465, in run
    self.create_opd(clr_tests=clr_tests, sync_out=sync_out, use_debugger=use_debugger)
  File "/home/daniel/.config/sublime-text-3/Packages/FastOlympicCoding/test_manager.py", line 1307, in create_opd
    file_ext = path.splitext(file_name)[1][1:]
  File "./python3.3/posixpath.py", line 125, in splitext
  File "./python3.3/genericpath.py", line 92, in _splitext
AttributeError: 'NoneType' object has no attribute 'rfind'
»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Thank you for doing this great job. This has eased many things. The test system is so great but can you add sometime later a feature that would parse the testcases from codeforces given the contest number to it?

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I have installed it from package control but unable to use it.Can somebody please tell what is the next step after installing the plugin?

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

Please, can anyone help with Test Manager for Windows? I tried Ctrl+Enter (new test) and Install Manually/Package, but I'm not able to create new tests.

ClassCompletion worked very well. It will help us so much! Thankss!

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anybody help me. When I try to compile it just hung. Can any body give me there settings file. Thank you

»
22 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey, I have a feature request, can you automatically fetch test cases from cf problem page into sublime editor? Something like Hightail does?

»
17 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is there any similar package for python I have switch from c++ to python and i miss it so much Thanks

»
17 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you explain how to use linter (Cpplint) and debugger?

»
14 months ago, # |
  Vote: I like it 0 Vote: I do not like it

please somebody help..how to use python in sublime text?

»
7 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Can you add support for competitive companion so that we can automatically run the test cases. You could also add a submit soln button using cf tools.

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

    Would be awesome if competitive-companion is supported in the plugin by default. It bothers me a bit that there's not even a shortcut for clearing all tests for a file, so after solving a problem I have to clear all the tests manually for that file to recode in that same file (Since I always code in files named "A.cpp"...etc in a folder).

    Until competitive-companion is supported by default, here's a little workaround: FastOlympicCodingHook

    Setup

    • Make sure you have python3, FastOlympicCoding and Competitive Companion installed.
    • Add 12345 in the list of ports of competitive-companion browser extension.
    • Clone the repository inside your Sublime Text Packages folder and rename the cloned folder to FastOlympicCodingHook. You can do a quick google search to locate that folder for your particular OS or you can click the "Browse Packages" option in Sublime Text (if you find it) and the folder will open itself.

    Usage

    1. Navigate to the file that you'll solve the problem in. Then right click anywhere in the file. You should find an option named Listen to Competitive Companion. Click on it.
    2. In the browser, navigate to the problem page and click on the competitive-companion extension's green plus icon.

    The problem test cases and correct answer would be parsed now and stored in a file named your filename/tests. You might not immediately see the change in test cases inside sublime text. But if you run your code using FastOlympicCoding plugin (ctrl+B), then it'll you show those updated test cases and run your code against them.

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

      can you plz elaborate more plz?add 12345 port and clone it

      but can't find Listen to competitive Companion option?

      can you plz help me?

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

        I recorded a short walk-through here. Try to follow these steps exactly as shown. Let me know if the option still doesn't appear. And sorry for the horrible quality of the video. I don't have any access to a WiFi right now.

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

          Thanks, for your effort.but in windows there is no test file created like u, and may it can't be recognize accepted or declined .anything happened always so accepted.

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

            Windows issue has been resolved now. Many thanks to ABSTERGO for helping me out.

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

              where i get updated version?

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

                I updated the code in github repository, so you can just delete and re-clone the repository in your sublime packages folder. Alternatively, you can also open the repository folder in your command prompt and run the command git pull which will update your local copy with the updated codes in github.

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

                  In windows when I dragging the .cpp__test file to sublime text, sublime text just opens the file instead of run the .cpp file. Am I missing something?

            • »
              »
              »
              »
              »
              »
              »
              4 months ago, # ^ |
                Vote: I like it +22 Vote: I do not like it

              First, I would like to thank DrSwad Jatana for their support.

              I'm using FastOlympicCoding and FastOlympicCodingHook on windows and it's working fine.

              1. Install the latest version of the FastOlympicCoding plugin(simply remove it and install again) from here FastOlympicCoding.
              2. Add the following line in the FastOlympicCoding' settings file: "tests_file_suffix": "__tests",
              3. Clone the FastOlympicCodingHook in your sublime packages folder.

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

                brother, is there any way it automatically knows that this test case is wrong or right?

                where should we add the line

                anywhere in the settings file

                or specific after some line?

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

                  anywhere on the right blank side

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

                In settings where should I add this line, and when I press ctrl + b its just displaying output in command line

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

                  add it on the right hand side. try ctrl+alt+b

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  5 weeks ago, # ^ |
                  Rev. 3   Vote: I like it -8 Vote: I do not like it

                  Thanks,that worked, Is there a way to delete all test cases at once?

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

can someone tell me , how to modify this so that it will work as given below ..

mmll --> multimap<ll,ll>
msll --> multiset<ll,ll>
dql  --> deque<ll>
  • »
    »
    4 months ago, # ^ |
      Vote: I like it -10 Vote: I do not like it

    You can use

    typedef mmll multimap<ll, ll>;
    typedef msll multiset<ll, ll>;
    typedef dql deque<ll>;
    

    or

    #define multimap<ll, ll> mmll
    #define multiset<ll, ll> msll
    #define deque<ll> dql
    
  • »
    »
    4 months ago, # ^ |
    Rev. 2   Vote: I like it +13 Vote: I do not like it

    Sublime menubar -> Tools -> FastOlympicCoding -> (in the File opened) cpp_completion_setting. Add any more snippet in the fashion given below.

    "deque":{
    	"template_size": 1,
    	"bind": "d"
    },
    "unordered_map":{
    	"template_size":2,
    	"bind": "D"
    }
    

    Please note that you can only use one char as bind.

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

Anyone know how to save state in CodeBlock? (Like sublime)

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

When I try to compile it only works the first time after I have started Sublime, then when I try to compile something it gets stuck at "compiling" and never finishes. I saw that there are people with similar issues but never found a solution to them.

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

    I have the same problem, but it gets stuck on "compiling" only after ctrl+shift+b (debugger)

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

      You just have to avoid using Ctrl+Shift+B, but if you can't there's a workaround.

      Make a new build system named "nobuild" and leave the file blank, then use it as your default build system. Now if you press ctrl+shift+b by mistake, it'll just do nothing, so problem solved!

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

    I have the same problem, and sometimes it gets stuck at "compiling" the first time after starting sublime.

»
4 months ago, # |
  Vote: I like it +10 Vote: I do not like it

I have a problem where when you save the file the test case gets cleared, is there any ways to fix that.

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

    The following should work.

    1. Open FastOlympicCoding settings file (press ctrl+shift+p and type Open Settings)

    2. Add the following line there: "tests_file_suffix": "__tests"

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

    It's not happening with me. When I save the file, I have to recompile it with ctrl+alt+b.

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

Vim comes with a steep learning curve and switching back to a normal text editor after that, with it's own....

koint n;ocin >> n;

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

Is there a way to send the code from the Sublime Text?

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is debugger works only for clang compiler? I use gcc on mac. When running with debug shows “LLDB.framework” is damaged and can’t be opened. You should move it to the Trash."

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey .. just like ctrl+d, which deletes the current testcase, Is there a way to have a key Binding which deletes all the test cases present in the file. Thanks in advance !

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Recently I tried to use ST because my codeblocks is compiling slow.But I'm facing problem that when there is infinite loop system is crashing.I want feature like codeblocks that whenever I write infinite loop system will not crashes?

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Will be amazing if it is integrated into VS Code.

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

Does the package require sublime text build-system to compile & run a C++ code ?? What I basically want to know is that.. How can I provide my own compiler flags or settings for C++ for the package??

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

i've just downloded the file. now what to do? i'm noob in this matter

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

It looks awesome. But It doesn't make any sense regarding the installation process. There should be some step by step instruction to setup this. This isn't some piece of cake. Owner of the tool should think about this matter

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

Update: I got it wrong!

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

Hi! IS there a way that we can delete all the existing tests of a program while compiling and enter all tests from the scratch. As deleting one test at a time is kind of annoying. Thanks.