Skip to content

Commit

Permalink
fix: vscode-wsl (#30)
Browse files Browse the repository at this point in the history
* fix: vscode-wsl

- using ${hostname} on code
- 立ち上げ → 立ちあげ

* fix: vscode-wsl: fix text by linting message
  • Loading branch information
atsushifx authored Feb 6, 2025
1 parent 41858af commit 48d944f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions articles/tips-vscode-wsl-remotedir.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ published: true
## はじめに

`WSL`から`Visual Studio Code`を使うと、`Windows`側のパスでファイルやディレクトリを開きます。
たとえば、`/home/atsushifx`下で`code .`としてディレクトリを開くと、"\\wsl.localhost\codings\home\atsushifx"のようなネットワークパスでディレクトリを開きます
`/home/atsushifx`下で`code .`としてディレクトリを開くと、`\\wsl.localhost\codings\home\atsushifx`のようにネットワークパスでディレクトリを開きます

`WSL`側のパスで開くには、`--remote`オプションを使う必要があります。

Expand All @@ -36,15 +36,15 @@ published: true
上記の`--remote`オプションは毎回使用するので、起動スクリプトに組み込みます。WSL 側の起動スクリプトは、次の通りです。

``` code : shell script
/mnt/c/app/develop/ide/VSCode/bin/code --remote wsl+coding $*
/mnt/c/app/develop/ide/VSCode/bin/code --remote wsl+${hostname} $*
```

以後、コマンドラインで`code .`と入力すれば、上記スクリプトが起動します。

## さいごに

このオプションを知る前は、`Visual Studio Code`を立ち上げた後にいちいちフォルダをリモート側で開く必要がありました
このオプションを知る前は、`Visual Studio Code`を立ちあげた後にいちいちフォルダをリモート側で開く必要がありました
今回はオプションの指定をスクリプトで自動的に指定しているので、サクッとプログラミングに集中できます。

それでは、Happy Hacking!
Expand Down

0 comments on commit 48d944f

Please sign in to comment.