Disable livesync on file change (CTRL+S) and livesync on another key shortcut


#1

Hello,

I’m using PHPStorm + NativeScript + Angular + TypeScript. I’m used to CTRL+S a lot, automatically. When developing I’m using tns run android and currently each time I press CTRL+S to save the file it will go compile and push it to my Android device.

Is it possible to change this behaviour? I just want to save the file and not compile it yet (because I need to wait for the compilation to continue). Let’s say I want to use CTRL+B to compile/livesync. how can I configure this?

Thank you.


#2

@dazdylz If I’m not wrong, livesync is not because you hit Ctrl + S. It just listens for any file changes in the project. Even if you copy paste any file directly, replace something it would still trigger a live sync.


#3

Is there no way to get around this?


#4

A simple option is not to save files too often. I use VSCode for development, you can control the auto save behavior (hopefully in any editor), save all at once when you are ready to sync.

Or

Disable livesync, you can always run the commands again when you are done. Once the native project is prepared it won’t take too long to launch app again.

Or

You may right your own hook to prevent sync may be by rejecting the promise when it is too often.


#5

If you are on VS Code,

map the save-all feature to Ctrl + S

And when you edit multiple files, you’ll only have to do Ctrl + S once to save all files and compile.

Map the save feature to Ctrl + Alt + S

I am using this mapping. It works well for me.