Features Tips & Tricks

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!

Comments below can no longer be edited.

12 Responses to Feature Spotlight: Editing remote files

  1. Avatar

    Даниил Водопьян says:

    June 26, 2015

    Is it available in InteliJ IDEA? Is it going to be?

    • Avatar

      Dmitry Filippov says:

      June 29, 2015

      It should be available in IDEA with the latest Python plugin.

  2. Avatar

    Arefin says:

    June 28, 2015


    Thanks for sharing important update of PyCharm. BTW, what is your PyCharm theme that you used for this blog? I really like the theme.


    • Avatar

      Dmitry Filippov says:

      June 29, 2015

      It’s standard Darcula theme. You can change it in settings | appearance.

  3. Avatar

    osama abuomar says:

    October 20, 2016

    this is very handy, thanks a lot.

  4. Avatar

    Prateek Arroa says:

    February 10, 2017

    Is it available in Pycharm Community edition ?

  5. Avatar

    Rob R says:

    April 11, 2017

    Is there anyway to use the default theme/color scheme when editing a remote file?

    I just got Pycharm PE set up, and went to use one of the default dark themes like Monokai, and my first project I tried to connect to a remote Python interpreter. I opened a remote file to edit, and the colors looked off, definitely not what Monokai should look like. After trying it multiple times, and confirming my settings, I figured I would try doing a local project to see if that was the issue. Lo and behold it was, when I went to create/edit a file in a project using my local interpreter, the colors for the theme were normal.

    Is there a way to use the same theme with a project editing remote files/remote interpreter? Is it a setting I am missing to turn off using different colors with a remote proj?


    • Avatar

      Ernst Haagsman says:

      April 11, 2017

      Hi Rob, I just replied to your DM on Twitter. Ernst

  6. Avatar

    Nathan Hunt says:

    October 5, 2017

    I do get code completion for, e.g., variables that I define, but when I’m editing a remote file I don’t have code completion for libraries that I import. I have a remote interpreter set up, and when I use the Python console, I do have tab completion there. Is there something in my setup that I’m missing to get that same tab completion when editing a script?

    • Avatar

      Ernst Haagsman says:

      October 5, 2017

      In this case it’s better to set up a deployment configuration to make sure your files are synchronized, you should get code completion only on your local files usually. You can set this up in Tools | Deployment | Configuration.

      • Avatar

        Nathan Hunt says:

        October 6, 2017

        I don’t recall having changed anything since posting my comment above, but today I am actually getting code completion now on the files I access through browsing remote host. I’m not sure if something was still downloading so that PyCharm knew the contents of the libraries I was using? The only thing missing now is that if I do ctrl-Q for help on a function, I see the arguments that it accepts but not the docstring. Instead there’s this message: “You need configured Python SDK to render docstrings.” Is there a way to set this up to work with editing files using the method on this page?

Discover more