Home›VS Code / Dev Env›毎回 `clear` と打つのが面倒なので、VS CodeのターミナルをControl + Lですっきりさせる
毎回 `clear` と打つのが面倒なので、VS CodeのターミナルをControl + Lですっきりさせる

毎回 `clear` と打つのが面倒なので、VS CodeのターミナルをControl + LですっきりさせるClear the VS Code Terminal with Control + L Instead of Typing `clear` Every Time

元記事を読むRead original articleqiita.com(新しいタブで開きます)(opens in a new tab)
AI2 点サマリSummary highlight
  • VS Codeのターミナルは、MacでControl + Lを押すと入力位置を画面上端へ移し、表示をすぐ整理できる。
  • 過去の出力はスクロールで見返せるため、clearの入力を省きたい利用者に役立つ。

VS Code's terminal moves the prompt to the top with Control + L on Mac while retaining scrollback, saving frequent terminal users from repeatedly typing `clear`.

本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (qiita.com) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (qiita.com).

要約と収集メタデータに基づく AI 解説。元記事全文の転載・翻訳ではありません。AI explainer based on the summaries and collected metadata, not a copy or translation of the full source article.

Control + L

VS Codeのターミナルでコマンド履歴が画面いっぱいになったときは、MacでControl + Lを押すと、表示をすぐに整理できる。毎回clearと入力してEnterを押す操作を省けるため、ターミナルを頻繁に使う場合に便利なショートカットだ。

入力位置を上部へ

Control + Lを押すと、現在の入力位置が画面上部へ移動し、ターミナルがすっきりした状態で表示される。履歴で埋まった画面を整える際に、clearをその都度入力する必要がなくなる。

clearとの違い

この操作はclearとは異なり、それまでの出力を完全に消すものではない。画面上の表示を整理した後も、上方向へスクロールすれば過去の内容を確認できる。以前の出力を見返せる状態を保ちながら、現在の入力位置を上端へ移せる点が特徴だ。

Macでの確認

動作が確認されているのはMacでのVS Codeだ。WindowsやLinuxでの動作は未確認とされているため、Control + LはMacで確認された操作として紹介されている。

VS Code Terminal

When command history fills the VS Code terminal screen, Control + L offers a quicker way to tidy the display than repeatedly typing `clear` and pressing Enter. The shortcut is a small convenience for people who use the terminal frequently.

Control + L

Pressing Control + L moves the current input position to the top of the screen. This immediately gives the terminal a cleaner view without requiring a command to be entered each time the display becomes crowded with command history.

The action is intended as a fast way to reorganize what is visible while continuing to work from the current prompt.

Unlike `clear`

Control + L does not completely remove the terminal’s previous output in the way `clear` does. Earlier content remains available above the current view and can still be checked by scrolling upward.

That distinction makes the shortcut useful when the immediate goal is to clear up the visible terminal area without losing access to past output. It reduces the repeated step of entering `clear`, while preserving the ability to review earlier commands and results.

Mac

The shortcut was confirmed on Mac. Its behavior on Windows and Linux was not confirmed.

ポコとTECHガイドPoko & TECH Guide

ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.

  1. ポコPokoVS Codeのターミナルが履歴でいっぱいになると、普段の作業はどう変わるの?When VS Code’s terminal fills up with command history, what changes in everyday work?
  2. TECHガイドTECH GuideMacならControl + Lで入力位置が画面上端へ移り、clearを打たずに表示をすぐ整理できるよ。On Mac, Control + L moves the prompt to the top, tidying the view without repeatedly typing clear.
  3. ポコPoko前はできなかったの? clearを入力する方法とは、何が違うんだろう。Couldn’t you do that before? How is it different from typing clear?
  4. TECHガイドTECH Guideclearでも整理できるけど、Control + Lなら過去の出力が残り、上へスクロールして見返せるんだ。Clear also tidies the terminal, but Control + L keeps earlier output available when you scroll up.
  5. ポコPokoそっか。入力の手間を減らしつつ、あとで履歴も確認できるのが大事なんだね。Got it. The key is saving a little typing while still being able to check earlier output.
  6. TECHガイドTECH Guideうん。今回はMacでの確認なので、WindowsやLinuxでの動作は未確認という点にも注意したいね。Right. It was only tested on Mac, so behavior on Windows and Linux remains unconfirmed.
記事情報・収集記録Article details & collection record
出典Source
Qiita VSCodeコミュニティCommunity
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
ブログBlog
原文言語Source language
JA
重要度の位置づけImportance in this lane
InfoInformational(VS Code / Dev Env 58件中、同等以上 58件)(58 of 58 VS Code / Dev Env entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
1.7 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
中期 (チュートリアル)Medium-term (tutorial)

🔷VS Code / Dev Env の他の記事More from VS Code / Dev Envもっと見る →View more →

ページ上部へScroll to top