microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.45k stars 28.62k forks source link

Improve the watcher for out of workspace files #6440

Closed sumonto closed 7 years ago

sumonto commented 8 years ago

Steps to Reproduce:

  1. Edit and existing file foo.txt in VS Code.
  2. Modify the VS Code file outside of VS Code.
  3. Expect VS Code to notify you that file has changed and/or give options to merge or reload.

I Unix like environment is very common to edit a file on your desktop and later ssh into your machine from else where and possible use ssh-->VIM to edit the file.

Once you come back to your desktop and use VS Code, I would expect to be prompted.

weinand commented 8 years ago

@sumonto VS Code detects external file changes: in 'autosave' mode it picks up changes silently, in 'manual save' mode it allows you to merge changes with a compare/merge editor on save.

If this doesn't work for you please provide details steps for how to reproduce the problem.

sumonto commented 8 years ago

Original Standard setting no modifications.

  1. Open test.txt in Vim
  2. Open test.txt in VS Code
  3. Use vim to add 2 lines test line test line
  4. Save file in vim
  5. VS Code automatically loads the changes
  6. Go back to vim
  7. Delete the 2 add lines
  8. Save file in vim
  9. Select back VS Code.
  10. The lines are not deleted, or the file is not autoloaded. In this case I did not modify the file using VS.
weinand commented 8 years ago

I can reproduce this problem with VS Code 1.1.1 on OS X if I open the file in VS Code without a workspace, e.g. with code test.txt from the command line. If I open the enclosing folder in VS Code and then select 'test.txt' I cannot reproduce.

@sumonto Are you opening 'test.txt' as a single file (VS Code has violet status bar) or as a file in a workspace (blue status bar)?

sumonto commented 8 years ago

As a single file without any workspace. 

Thanks

_____________________________

From: Andre Weinand notifications@github.com Sent: Wednesday, May 18, 2016 12:44 PM Subject: Re: [Microsoft/vscode] VS Code to detect and notify if file modified outside of VS Code. (#6440) To: Microsoft/vscode vscode@noreply.github.com Cc: sumonto sg1000@hotmail.com, Mention mention@noreply.github.com

I can reproduce this problem with VS Code 1.1.1 on OS X if I open the file in VS Code without a workspace, e.g. with code test.txt from the command line. If I open the enclosing folder in VS Code and then select 'text.txt' I cannot reproduce.

@sumonto Are you opening 'test.txt' as a single file (VS Code has violet status bar) or as a file in a workspace (blue status bar)?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

bpasero commented 8 years ago

Likely that our file watcher fails for external applications that write to files using atomic file changes (that is a delete followed by an add). If you can modify Vim to change this behaviour, it would likely work OK.

sumonto commented 8 years ago

I don't see the same issue while using Sublime or other editors. So why VSCode?

Thanks

On Sun, May 22, 2016 at 2:05 AM -0700, "Benjamin Pasero" notifications@github.com wrote:

Likely that our file watcher fails for external applications that write to files using atomic file changes (that is a delete followed by an add). If you can modify Vim to change this behaviour, it would likely work OK.


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Microsoft/vscode/issues/6440#issuecomment-220821782

sumonto commented 8 years ago

Any update folks

bpasero commented 8 years ago

Thanks so much for your interest in this issue! It is currently assigned to the backlog. Every month we pick items from the backlog to plan for the current iteration. Please see https://github.com/Microsoft/vscode/wiki/Issue-Tracking#planning for more information.

Since we are a small team of developers, there is only so many feature requests and issues we can work on for one milestone. Nevertheless we always welcome pull requests and are happy to accept them if they meet our quality standards.

bpasero commented 7 years ago

https://github.com/Microsoft/vscode/issues/15111