LoginSignup
1
0

More than 3 years have passed since last update.

[VS Code] VS CodeにVimをインストールしたら赤いハイライトに悩まされた

Posted at

Problem

VS Codeの拡張機能"Vim"をインストールすると、原因不明の赤いハイライトに襲われる
image.png

原因

同じく拡張機能Trailing Spacesと干渉している様子

Trailing Spaces - Visual Studio Marketplace
行末のspaceをハイライトして知らせてくれます
保存時に自動的にspaceを取り除くことも可能、便利!

解決

以下を参考に編集中の行をハイライトしないように設定します

Highlight Current Line
Default: true

Highlighting of trailing spaces in the currently edited line can be annoying: each time you are about to start a new word, the space you type is matched as a trailing spaces. Currently edited line can thus be ignored:

{ "trailing-spaces.highlightCurrentLine": false }

Trailing Spaces - Visual Studio Marketplace

settings.jsonに以下の行を追加します

"trailing-spaces.highlightCurrentLine": false,

ちなみに、保存時の自動space削除オプションは

"trailing-spaces.trimOnSave": true, 

環境

  • macOS catralina
  • VSCode v1.50
  • Vim v1.17.1
  • Trailing Spaces v0.3.1
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