1

Sometimes I edit a file in Terminal, which is currently open in WebStorm's editor window and I want that WebStorm refresh the content immediately (on external changes).

How could I do that? Is there a configuration for that?

P.S. I know, there is a short cut for synchronize Strg+Alt+Y (File Menu/Syncronize) but I don't want to use a shortcut or navigate to menu or click the content in editor. My IDE should do it automatically.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
  • Terminal as another (native) app .. or IDE's built-in Terminal? Thing is -- IDE checks for changes in file system when you switch frames (saves files when you leave and re-checks when you focus IDE). This is a default behaviour which can be changed (`Settings/Preferences | Appearance & Behaviour | System Settings`) -- maybe you have turned that off? It may not find your external changes if your files located on network .. or sometimes even symlinked folders (but that mainly Windows AFAIK). *Partially related:* http://stackoverflow.com/a/6628645/783119 – LazyOne Jul 19 '16 at 11:09
  • The files are not located on the network, all of them are locally stored. Refresh onFocus is still working, but it should refresh automatically, without changing frames. In built terminal or another one should not make a difference,.. –  Jul 19 '16 at 12:09
  • Sorry -- it does not work like that, *unfortunately*. IDE is looking for changes only on certain events (like frame focus), mainly for performance reasons. It may not be the issue for you (where you may have (relatively) small/simple project) but in real world people do use the same IDE for huge projects (100MBs in size; 100K files etc) where simple refresh takes 10s of seconds if not minutes (keep in mind: this is a platform-wide functionality and used by other IDEA-based IDEs -- it's not WebStorm specific). With that in mind -- doing constant Synchronize is not an option. – LazyOne Jul 19 '16 at 13:05
  • That was from "sync whole project" side. From currently opened files side -- that's a bit different story. Here it is indeed executing more frequent (automatic) Synchronize might be an option as number of opened files is usually small (well, depends on person .. but I usually have under 6-10 files opened; some may 20 or so). Unfortunately I cannot really comment this part as I do not know how exactly it works here. I remember seeing a discussion on such subject (in one of the tickets few years ago) but cannot find it right now. – LazyOne Jul 19 '16 at 13:09
  • The best suggestion I can give you right now -- file a Feature Request ticket for such functionality and devs will either accept ticket as new .. or will point to a previous/already-existing ticket -- they know this stuff much better than an outside person. https://youtrack.jetbrains.com/issues/IDEA -- once (IF) you create such ticket -- please leave a link to it here -- I'm interested to see what they will have to say about it (for my own curiosity). – LazyOne Jul 19 '16 at 13:13

0 Answers0