Feature Spotlight: Editing remote files
Happy Friday everyone!
In today’s blog post I’m going to cover a new feature recently appeared in PyCharm 4.5.x series: editing files directly on remote hosts. In a previous blog post, Feature Spotlight: Python remote development with PyCharm, I covered some basic principles of remote development using PyCharm: how to set up a remote interpreter for your project, vagrant box, VM, or even bare metal machine, and how to set up the deployment of your local project to the remote host. This post supplements the earlier one by focusing on editing files directly on remote hosts.
So let’s get started. At this point I assume you already have a remote host up and running, and the remote interpreter and deployment options properly configured in PyCharm.
At any time during development, you can go to Tools | Deployment | Browse Remote Host. This action will open the dedicated tool window for browsing remote files inside PyCharm:
In this window you can perform some common file operations, like renaming files and directories, changing permissions, copy/paste/delete, as well as creating new files and dirs. But what is most useful here is that you can open any file like you do in the project view:
See that special toolbar at the top of the editor? It tells you that the opened remote file hasn’t been changed yet. So let’s make some changes. Note that when you edit the file, PyCharm provides all the usual goodies like autocompletion, error-checking, quick-fixes, etc.:
When you’re done with changes, the toolbar indicates that the file has been changed and asks you if you want to upload it. Before the actual upload, you might want to compare the changed file with its previous state. Click on the toolbar to inspect the diff:
You can revert your changes any time, by restoring the file to its previous uploaded version:
Finally, click to upload your file.
I hope this feature makes your remote development even easier.
Have a nice weekend, and talk to you next week!
Subscribe to Blog updates
Thanks, we've got you!
Five Things To Love About the New UI
Are you using the New UI yet? Not yet? Let me tell you why it's the best thing since sliced bread! Let’s get it enabled and take a look around. The easiest way to do that is from the Settings cog at the top-right of the UI: PyCharm will need to restart, but that’s it; you’re done! In t…
Tutorial: Visual testing with pytest
If you are like many Python developers out there you LOVE writing code! Tests? Not so much. Whether it’s the concept of testing or the interface of testing tools, testing is a chasm not all developers cross. The Visual Testing with pytest tutorial aims to bring Python testing to the masses, tak…
Smart execution of R code
R plugin is announcing some helpful features to track execution of your R code: 1. Execute your R file as a runnable process, job. Jobs are shown in a separate tab in the R console. You can preview the job status (succeeded or failed), the duration of the execution, and the time you launched the …
New Database Features in PyCharm 2020.1
PyCharm 2020.1 comes with new Database export features that make exporting data easier. You can now see previews of the data that you want to export, letting you have a quick glance of what the data will look like. Furthermore, as many of our users prefer to export to Excel files, we've also adde…