Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6778327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:15:13+00:00 2026-05-26T16:15:13+00:00

Simple question (I hope). It’s driving me nuts. I’m trying to create a simple

  • 0

Simple question (I hope).
It’s driving me nuts. I’m trying to create a simple script in my vimrc to map:

<Leader>e

to open the quickfix window. I also want that key combo to close the quickfix window if it is currently open.
The problem is, the bufexists command seems to skip over the quickfix buffers.
Can you please give me some advice on how to detect if there is a quickfix window already open?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:15:13+00:00Added an answer on May 26, 2026 at 4:15 pm

    The :cwindow command might be what you’re looking for. From the help:

                                *:cw* *:cwindow*
    :cw[indow] [height] Open the quickfix window when there are recognized
                        errors.  If the window is already open and there are
                        no recognized errors, close the window.
    

    However, if you want to close the quickfix window even if there are still errors, then check out this Vim Tip, which provides the following snippet:

    command -bang -nargs=? QFix call QFixToggle(<bang>0)
    function! QFixToggle(forced)
      if exists("g:qfix_win") && a:forced == 0
        cclose
        unlet g:qfix_win
      else
        copen 10
        let g:qfix_win = bufnr("$")
      endif
    endfunction
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn WPF, so here's a simple question, I hope: I have
Its simple question and hope to find quick answer. When I open the application
i have pretty simple simple question (i hope so). How do i change the
Here's a simple syntax question (I hope), I know how to constrain one generic
I have a simple question about Java's XML API and I hope there's a
I have what I hope is a simple question pertaining to the Atmel AVR
I have what I hope is a fairly simple question about using the value
Well, I have a simple question, at least I hope its simple. I was
I hope this is a simple enough question for any SQL people out there...
I have a simple question for you (i hope) :) I have pretty much

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.