Блог пользователя uc-nuts

Автор uc-nuts, история, 8 лет назад, По-английски

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.

  • Проголосовать: нравится
  • +21
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

  • »
    »
    8 лет назад, # ^ |
    Rev. 3   Проголосовать: нравится +4 Проголосовать: не нравится

    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!)
    
»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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!

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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.

    • »
      »
      »
      8 лет назад, # ^ |
      Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

      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.

      • »
        »
        »
        »
        8 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

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

        • »
          »
          »
          »
          »
          8 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Yes, exact it is. What sould I do?

          • »
            »
            »
            »
            »
            »
            8 лет назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится

            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.

            • »
              »
              »
              »
              »
              »
              »
              8 лет назад, # ^ |
                Проголосовать: нравится +5 Проголосовать: не нравится

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

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

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