2

When I run yapf on my code, an error page appears, rightly showing the error I have in the code. How on earth do I close this window and go back to my code? :lclose doesn't work. :close closed the whole tab, including my code. :q closes the whole tab again. How can I close this error tab?

I am running gVim 8. Thank you in advance.

2
  • 4
    Have you tried :cclose?
    – garyjohn
    Aug 8, 2017 at 3:14
  • can you show a screenshot of the error pane that has been opened (since it seems that neither :lclose nor :cclose work for you). Aug 9, 2017 at 6:03

1 Answer 1

5

It's aquickfix window, and you can close it with the command :cclose.

The above is rubbish, and I apologise for answering too hastily.

All the yapf plugins I found seem to work by replacing your entire file contents with the result of running the yapf command. (This is expected functionality, as yapf is a code formatter.)

You should be able to go back simply by pressing u to undo the changes that the command you ran has made to your code.

3
  • It doesn't close the window :( nothing happens when I do <code>:cclose</code> Any idea why?
    – Ali
    Aug 9, 2017 at 3:36
  • @Ali It's because it's not a quickfix window! See my edited answer for a solution that is more likely to work. If it doesn't work, then let me know what plugin or command you're using to invoke yapf from Vim.
    – Rich
    Aug 9, 2017 at 8:38
  • Thanks @Rich. It works fine. You saved me a lot of headache. Thank you very much.
    – Ali
    Aug 9, 2017 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.