> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Publishing and editing files with Sublime Text

> Learn how to publish and edit files with Sublime Text.

[Sublime Text](https://www.sublimetext.com/) is a feature-rich commercial text editor that is widely used by developers for editing code base files. It has advanced features such as syntax highlight, auto Indentation, file type recognition, sidebar, macros, plug-in, and packages making it a great text editor for any beginners. Recent Sublime Text 4 feature updates include even more features such as tab multi-select for a better split view, improved auto completion that provides completion based on existing projects, support for new programming languages such as TypeScript, JavaScript Syntax Extension (JSX), and TSX, less memory usage, faster load times, and many more.

This article describes how to publish and edit files on a hosting.com server using Sublime Text.

## Publishing and editing files on a hosting.com server with Sublime

With Sublime Text, you can edit files directly on the server. Additionally, you can create files on your local computer, and then upload them to the server.

Before you can do either of these tasks, however, you must first install the SFTP (Secure File Transfer Protocol) extension for Sublime Text. To do this, follow these steps:

1. If you have not already installed Package Control for Sublime Text, go to [https://packagecontrol.io/installation](https://packagecontrol.io/installation) and follow the instructions.

2. Restart Sublime Text.

3. On the **Tools** menu, click **Command Palette**.

4. Scroll down the list, and then click **Package Control:Install Package**.

5. Scroll down the list, and then click **SFTP**. Package Control installs the extension.

### Editing files on the server with Sublime

Sublime Text enables you to edit files directly on a remote server. To do this, follow these steps:

1. Start Sublime Text.

2. On the **File** menu, click **SFTP/FTP**, and then click **Setup Server**. Sublime Text opens the configuration file for the connection.

3. Confirm that the **"type"** value is **"sftp"**.

4. For the **"host"** value, replace **example.com** with your own domain name.

5. For the **"user"** value, replace **username** with your hosting.com account username.

6. Delete the two forward slashes (//) that start the **"password"** line. Replace the second occurrence of **password** with your own hosting.com account password.

7. If your server uses a non-standard SSH port (like 7822), delete the two forward slashes (//) that start the **"port"** line, and then replace **22** with the correct port number.

8. For the **"remote\_path"** value, replace **/example/path/** with **/home/username**, where ***username*** represents your hosting.com account username.

9. On the **File** menu, click **Save**.

10. In the **File name** text box, type a name for the connection, and then click **Save**. A list of folders on the remote server appears.
    > 📘 Note
    >
    > If the folder list does not appear, on the **File** menu, click **Browse Server** , and then click the name of the connection you just saved.

11. Click a folder name to access the folder. When you click a filename, click **Edit** to edit the file. You can then edit the file directly on the server.

12. Make any changes to the file that you want, and then on the **File** menu, click **Save**.
    > 👍 Tip
    >
    > Alternatively, you can press Ctrl+S.

13. Sublime Text saves the changes to the file on the server.

### Publishing files to the server with Sublime

In addition to editing files on the server directly, you can upload files to your account using Sublime Text. To do this, follow these steps:

1. Start Sublime Text.

2. On the **File** menu, click **Open Folder**.

3. Select the folder on your local computer where you want to want edit files, and then click **OK**.

4. In the sidebar, right-click the name of the folder you selected in step 3, click **SFTP/FTP**, and then click **Map to Remote**. Sublime Text opens the configuration file for the connection.

5. Confirm that the **"type"** value is **"sftp"**.

6. For the **"host"** value, replace **example.com** with your own domain name.

7. For the **"user"** value, replace **username** with your hosting.com account username.

8. Delete the two forward slashes (//) that start the **"password"** line. Replace the second occurrence of **password** with your own hosting.com account password.

9. If your server uses a non-standard SSH port (like 7822), delete the two forward slashes (//) that start the **"port"** line, and then replace **22** with the correct port number.

10. For the **"remote\_path"** value, replace **/example/path/** with **/home/username**, where ***username*** represents your hosting.com account username.

11. On the **File** menu, click **Save**. All of the files and folders in the specified folder appear in the sidebar, along with many additional options. For example:

* To upload a file to the server, right-click the file in the sidebar, click **SFTP/FTP**, and then click **Upload File**.

* To download a file from the server, right-click the file in the sidebar, click **SFTP/FTP**, and then click **Download File**.

<Note>
  There are many more options available for remotely mapped files and folders: you can view differences between files, synchronize files and folders, and more. For more information, please visit [http://wbond.net/sublime\_packages/sftp/usage](http://wbond.net/sublime_packages/sftp/usage).
</Note>

## More information

For more information about Sublime Text, please visit [https://www.sublimetext.com](https://www.sublimetext.com).
