Status quo and existing problems
1.air Or fresh?
- Air library address: github.com/cosmtrek/ai…
- Fresh Library address: github.com/gravityblas…
Air and Fresh are both Golang hot reload tools that automatically detect changes to code files and trigger recompilings. They look perfect, but as anyone who has used them probably knows, one of the more troublesome aspects is that in Goland’s Terminal, the cursor does not automatically scroll to the bottom of the file every time it is hot reloaded. This creates a problem. When you try to print a variable to Terminal, you have to manually scroll through the Terminal scroll bar to see the value of the variable at the bottom that you want to see.
2. Goland menu bar tool ()
Because of the above, after each thermal overload will need to manually scroll to the bottom, so some children may choose goland built-in debugging tools, every time, after the modification of the code manually click button to recompile, although lost thermal overload is convenient, but at least goland can help us clear screen automatically, and the focus in the console automatically roll to the bottom.
To solve the problem
Without further ado, there are three steps to solve the problem:
- Create a new shortcut list option, named Reload Program (optionally, custom)
-
Install a Save Actions plug-in and restart the IDE
-
Go to plug-in Settings, check the following two options, and select the previously added shortcut option from the second drop-down box, and click OK or Apply to save the configuration
- Once the above configuration is complete, you can use Ctl+ S to save the code and reload it automatically