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 8670367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:41:31+00:00 2026-06-12T18:41:31+00:00

in vim, when I use :make the output of make is displayed in a

  • 0

in vim, when I use

:make

the output of make is displayed in a “external” window, I don’t like this and I use this map

 nnoremap <leader>m :w <bar> make<CR><CR><CR>:copen<CR>

but, in some case the output of make is

 make: Nothing to be done for `all'.

how I can add a autoclose to copen when the copen have make: Nothing to be done for all. ?

  • 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-06-12T18:41:32+00:00Added an answer on June 12, 2026 at 6:41 pm

    You can check the contents of the quickfix list via getqflist(). Then, I would only conditionally open the quickfix window if the first line does not match the text you don’t want to see:

    nnoremap <leader>m :w <bar> make<CR><CR><CR>
    \:if get(get(getqflist(), 0, {}), 'text', '') !~# 'Nothing to be done' <Bar> 
    \  copen <Bar>
    \endif<CR>
    

    The access via get() avoids errors when the list is empty.

    You could also always open the list, and then use :cclose in the conditional, if that better fits your needs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use :make in Vim to execute a makefile. The makefile has this output:
I really like this vim trick to use the left and right arrows to
In the normal case I use vim's make utility I will set makeprg to
Make it on Linux. The reason to use more than one version of Vim,
My system has some default vim settings that make no sense to use on
I would like to make vim my C++ editor. I have very little experience
I want to learn to use vim. The thing is simple : I don't
How do I make vi - Vim never use tabs (converting spaces to tabs,
I currently use vim in a telnet window for editing code (very old school!).
I've been trying to use vim to simplify writing latex. To this end, I

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.