# Visual Studio CodeからFTPソフトのTransmitを使用する拡張機能「Transmit」 URL: https://webrandum.net/vscode-plugin-transmit/ 公開日: 2022-09-26 更新日: 2022-09-26 カテゴリー: コーディング タグ: Transmit, Visual Studio Code, Visual Studio Codeプラグイン 出典: Webrandum(著者: サイトウ マサカズ) Macユーザーにとって定番のFTPクライアントの「[Transmit](https://webrandum.net/transmit5/)」ですが、拡張機能を使えばわざわざアプリを切り替えなくてもVisual Studio CodeからFTP接続してファイルをアップできます。 [![](https://www.google.com/s2/favicons?domain=webrandum.net)Webrandum![](//webrandum.net/mskz/wp-content/uploads/2019/04/eyecatch-13.jpg)Macで快適なFTPクライアントを探しているなら「Transmit 5」がオススメhttps://webrandum.net/transmit5世の中にWebサイトを公開するためには、既存サービスを使う場合を除いて、サーバーにファイルをアップロードする必要があります。そのために必要となるのが「FTPクライアント」と呼ばれるアプリケーションです。今回はそんなFTPクライアントの中から、自分がずっと使っているTransmitの紹介をします。Transmitとは?TransmitはCodaで有名なPanic社が開発しているアプリケーションです。有料のアプリですが、それに見合った魅力があります。 動作や、アップロード・ダウンロードが早い FUSEを入れれば「ディスクにマウント」が可能(外...](https://webrandum.net/transmit5) 開発環境に接続しておき、アップしてすぐ確認したい場合に便利です(本番環境はなにがあるか分からないので使用しない方が良いです)。 ## Transmit ![Transmit](https://webrandum.net/mskz/wp-content/uploads/2022/09/image_1-10-scaled.jpg) [![](https://www.google.com/s2/favicons?domain=marketplace.visualstudio.com)marketplace.visualstudio.com![](//webrandum.net/mskz/wp-content/uploads/pz-linkcard/cache/7d2cfa44db6cc4b1f2a0691b55e06988e7cc1746d7f08a93f61bc5a3d55474cf.webp)Transmit - Visual Studio Marketplacehttps://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-transmitExtension for Visual Studio Code - Adds a few commands for interacting with Transmit.](https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-transmit) 名前の通り、FTPクライアントのTransmitと連携してサーバーに接続してアップロードや同期ができます。 最初に設定が必要ですが、わざわざTransmitを起動する必要がなくなります。 便利ですがミスすると怖いので、あくまで開発環境に対してだけ行うようにしましょう。 ## 基本的な使い方 ### サーバーの設定 まずは接続するFTPサーバーの設定です。 「”transmit.servers”」配列内にサーバーの設定を追加していくことで何個でも追加できます。 ``` { "transmit.servers": [ // List of servers { // Server object "favorite": "", // Name of the Transmit favorite to use "domain": "", // Domain to connect to (e.g. example.com) "user": "root", // User used in the connection "protocol": "SFTP", // Protocol used in the connection "localRoot": "", // Local root path "remoteRoot": "" // Remote root path } ] } ``` | 項目 | 内容 | | --- | --- | | favorite | 使用するTransmitのお気に入りの名前 | | --- | --- | | domain | 接続するドメイン名 | | --- | --- | | user | ユーザー名 | | --- | --- | | protocol | プロトコル(SFTPやFTPなど) | | --- | --- | | localRoot | ローカルルートパス | | --- | --- | | remoteRoot | リモートルートパス | | --- | --- | ### サーバーへの接続 shift + command + Pでコマンドパレットを開いて、下記それぞれの項目を検索して選択すると、Transmitの操作ができます。 ![Transmitのコマンドパレット](https://webrandum.net/mskz/wp-content/uploads/2022/09/image_2-10.png) | コマンドパレット | 内容 | | --- | --- | | Transmit: Connect | サーバーに接続する | | --- | --- | | Transmit: Upload | 現在開いているファイルをサーバーにアップロードする | | --- | --- | | Transmit: Download | サーバーからファイルをダウンロードする | | --- | --- | | Transmit: Synchronize | ローカルパスとリモートパスを同期する | | --- | --- | 使いこなすためには、サーバーの設定で「localRoot」と「remoteRoot」までちゃんと設定する必要があるので、最初の手間がかかりますが、1度設定してしまえばアップロードが非常にラクになります。