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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:57:56+00:00 2026-05-27T14:57:56+00:00

I always forget to save all the files in buffer before compile using the

  • 0

I always forget to save all the files in buffer before compile using the vim build-in compile command :make. So is it possible to make vim print a hint about save file just like what it does when we quit before saving files?

  • 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-27T14:57:56+00:00Added an answer on May 27, 2026 at 2:57 pm

    Edit Re:

    I found that “autowrite” option can solve this problem in some aspect, but i will also autowrite when i type next, previous, tag. I am looking for a better solution

    You can use QuickFixCmdPre:

    :au QuickFixCmdPre * write
    

    This example will save files on doing make. See for more info :he autocmd.

    Of course, this will only work if you use vim’s

    :make
    

    If you use other programs, don’t use e.g. :!scons -C src, but instead use :se makeprg=scons\ -C\ src and regular :make to trigger all builtin Quickfix functionality.

    For more flexible auto-writing, see :


    `autowrite`

    I just use

    :set autoread autowrite
    

    in my .vimrc; This is actually quite safe, you’ll get warned whenever you risk losing changes either in-buffer or on-disk.

    This is also pretty sweet when working on windows, simultaneously having the same file open in another program (say, Visual Studio or Notepad++; both can be configured to autoreload files on change as well).

    The best part about this is that it will autosave also on minimize, so whenever you hit C-z to minimize, the file will be written (assuming it wasn’t changed on disk as well), and when you restore the window (or foreground it, in a terminal context) you’ll automatically get the most up-to-date file contents.

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

Sidebar

Related Questions

I always forget how to do things like this. I have a database table
I've looked this up a thousand times, and I always forget it, so, here
I always tend to forget these built-in Symfony functions for making links.
I always believe they did, but seeing some answers here make me doubt... Can
What's the best way to do it in .NET? I always forget what I
When creating a new web project in Visual Studio 2010 I always forget to
I always forget what colors I'm dealing with in CSS when I see it
I always forget to change the version number for bugfix version, when i released
Is it possible to group a number of committed files together (as a single
for some bizarre reason I always forget the exact syntax of arrays. How do

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.