1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VSCode でEnterが効かなくて人生詰んだ

Last updated at Posted at 2024-12-06

始まりは自己紹介から

はじめまして
VSCodeがまともに使えないあおげばにゃんこです。
今回はVSCcodeでEnterが 効かなくなった or 効きづらくなった 話をしようと思います。
基本的にはしょうもな記事なので気楽に書きます。

最近の悩み

ここ最近VSCodeで開発する際、Enterを押しても改行しない現象が発生しました。
しかもこの症状、最長で5分近く発生していたので非常に困っていました。

洞察力の発揮

動作するまで待っている間、画面を見てふとあることに気づきました。

VSCodeの「ソース管理」のアイコンがずっと読み込み中であるということに!

image.png

そして私は
"gitの影響でこの事態が発生しているのではなかろうか!"
という結論に至りました。

自演乙!

気づきを得た私はおもむろに以下のコマンドを実行しました

git stash list

すると

.
.
.
stash@{27}: WIP ~~~~~~~~~~~~~~~~~
stash@{28}: WIP ~~~~~~~~~~~~~~~~~

バケモンみたいな数字が現れました

もうお分かりですね?
私はアホみたいにgit stashコマンドを使っていたせいで、リソースをこの保持に使用していたのです。

おかえり 快適なVSCodeライフ!

こうしてstashを削除した私は安寧を手に入れました

余談

stashをdropする際に28もあったので楽に消したいと考えるのがエンジニアとしての習性です。
私はshellに詳しくないので、調べてみました。
すると以下の様に実行すれば良いと判明しました

for i in {28..5}; do
  git stash drop stash@{$i}
done

※後から処理するのは削除されて番号がズレるためです

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?