3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VS Codeの効率化チップス4選

こんにちは!今回は、日々のコーディング作業をもっと効率的にするためのVisual Studio Code(VS Code)の便利なチップスを4つご紹介します。興味のある操作があったら、紹介している動画の操作をチェックしてみてください。

デモ動画の紹介

image.png
image.png

1. Word Wrap Code(テキストの折り返し)

概要

長い行のコードを画面幅に合わせて自動的に折り返す機能です。

ショートカット

  • Alt + Z

メリット

  • 横スクロールの手間が省け、コードの可読性が向上します。

使用例

// 折り返しなし
const longString = "この文章は非常に長く、画面の幅を超えるため横スクロールが必要です。";

// 折り返しあり(Alt + Zを適用)
const longString = "この文章は非常に長く、
画面の幅を超えるため横スクロールが必要です。";

2. Joining Lines Hack(行の結合)

概要

複数行のテキストを一つの行に結合する機能です。

コマンド

  • Ctrl + Shift + PJoin Lines

メリット

  • テキストの整理やフォーマットの統一に便利です。

使用例

// Before
These,
lines,
I wish
they were joined together!!

// After (Ctrl + Shift + P → Join Lines)
These, lines, I wish they were joined together!!

3. Auto Save - More Than One Way(自動保存設定)

概要

変更を自動的に保存する設定です。設定により、保存のタイミングをカスタマイズできます。

設定方法

  • Files: Auto Save

オプション

  • afterDelay, onWindowChange, onFocusChange, off

メリット

  • 作業中の変更が失われることを防ぎます。

使用例

// afterDelay: 一定時間後に自動保存
// onWindowChange: ウィンドウが変更されたときに自動保存
// onFocusChange: フォーカスが変更されたときに自動保存

4. Ctrl + Shift + K: 行の削除

概要

選択中の行を素早く削除するショートカットです。

ショートカット

  • Ctrl + Shift + K

メリット

  • 不要な行を効率的に削除できます。

使用例

// Before
line 1
line 2 (to be deleted)
line 3

// After (Ctrl + Shift + K applied)
line 1
line 3

これらのチップスを活用することで、VS Codeの操作がより効率的になるでしょう。ぜひ試してみて、あなたのコーディング体験を向上させてください!

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?