uc-nuts's blog

By uc-nuts, history, 7 years ago, In English

I use vim for editing code for some time now, At first I'd edit solutions at vim and to run tests I'd open shell and type in the command to run and check the solution. That was quit a pain. Main objective of this plugin was not to go back and forth between my shell and vim.

I've written and been using this plugin for a while. you can check on the details on Github. Main feature of this plugin is that, you can give the input test case in a buffer and it'll show the output in another buffer. Also it saves the i/o history so that you can run all the cases at once!

I'd be very happy if this plugin helps anyone! Any suggestion is welcomed.

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

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

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

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

Thanks! Good plugin! I wonder if there is a plugin to get two code and run them, one as a tester of the other?!

  • »
    »
    7 years ago, # ^ |
    Rev. 3   Vote: I like it +4 Vote: I do not like it

    It already exist!

    use cat command in linux terminal:

    cat ./testeGenerator.out >> test.txt (runs test generator and put its output in test.txt!)
    
    cat test.txt | ./solution (runs solution with test.txt for input!)
    
»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

There is a problem in this plugin! :IOI works but :OI for running tests don't output anything!!! And in input if we write two separate string and cin one string it get all of the lines!

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

    Not clear what you're saying. Can you create an issue with screenshots on Github please? However :OI will close i/o buffers. :IO will run your code with current test case that's written on the input buffer. So whatever it is on the input buffer that time, will be treated entirely as a test case. Hope it helps.

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

      I made a mistake. I mean IO. When I type it to run my code then the output will be empty.And when I try IOI the tests run as I wrote them in input without output. To sum up, IOI and IO(for running) don't have any output.

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

        So i/o buffers showing up but nothing on output buffer, right? Your program may have been crashed.

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

          Yes, exact it is. What sould I do?

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

            I meant your solution may had runtime error [I have a plan to handle this case]. Can you please a run simple code (like takes a string input and outputs it) to see if the command works.

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

              The problem solved! The mistake was from my vimrc! set shell=/bin/sh.

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

      I install the package with plugin manager twice and the problem is not solved!