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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:41:16+00:00 2026-06-10T04:41:16+00:00

Before I heard about vim, I used to use gedit. I still try to

  • 0

Before I heard about vim, I used to use gedit. I still try to make vim behave as same as gedit, this is because I have asked many questions related to vim on StackOverflow.

One feature I am missing is when any file was modified while I was working on any file on gedit by another application, a popup use to come which says The file <file_location> changed on disk. Do you want to reload the file? And there were two buttons named Reload and Cancel respectively.


What I want:

(Please note that I am using vim, not gvim) I want similar feature in vim. I want if any file get changed on disk, a warning message come at status bar:

File changed, press F9 to reload.

I will map my F9 to do :e.

  • 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-10T04:41:18+00:00Added an answer on June 10, 2026 at 4:41 am

    If autoread is set, vim checks whether the file has been modified after each shell command (:!), on writing the file, and when you issue :checktime. gvim in addition checks when you switch window focus to the application.

    You can execute :checktime periodically using the recipe at http://vim.wikia.com/wiki/Timer_to_execute_commands_periodically:

    autocmd CursorHold * call Timer()
    function! Timer()
        call feedkeys("f\e")
        checktime
    endfunction
    set updatetime=5000  " milliseconds
    

    To just print a warning, set the autocmd FileChangedShell (Detect file change, offer to reload file):

    autocmd FileChangedShell * echo "File changed, press F9 to reload."
    

    For Insert mode, use CursorHoldI (not sure about this feedkeys sequence, but it seems to work):

    autocmd CursorHoldI * call TimerI()
    function! TimerI()
        call feedkeys("\<C-R>\e")
        checktime
    endfunction
    

    You might have to change the FileChangedShell autocmd from echo to echoe, as I don’t think echo gets printed in Insert mode.

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

Sidebar

Related Questions

Before I heard about self executing functions I always used to do this: $(document).ready(function()
I am referred to Hudson today. I have heard about continuous integration before, but
Ive never heard of this before, and I have been coding in PHP for
I have used AspectJ before for Java, and I recently have thought about checking
I've heard questions about bypassing this security feature of Windows 7 before, but I
I have heard the term decompiling used a few times before, and I am
I've heard before that modules are just classes too. I have a few situations,
I have heard about bluetooth via GameKit and external accesory framework in iPhone .
It's weird because I have done it before but it just is not working.
Today I found out about an interface I'd never heard of before: IGrouping IEnumerable<IGrouping<YourCategory,

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.