kenanのブログ

闘病生活

エディタ環境設定

エディタ設定

キーバインド的にEmacs使いたい所だけど、VisualStudioCodeにした。

設定

ターミナルはWSLにした

"terminal.integrated.shell.windows": "C:/Windows/System32/wsl.exe"

lintを入れたかったのでvsCode拡張機能としてrubocopを入れた。

WSLでgemからrubocopをインストールした後に適当なディレクトリにbatファイルを作成する。

私の環境では以下の場所だったので

$ which rubocop
/home/kenan/.rbenv/shims/rubocop

このように作成した。

rubocop.bat
@echo off
wsl ~/.rbenv/shims/rubocop $^(echo '%*' ^| sed -e 's^|\\^|/^|g' -e 's^|\^([A-Za-z]\^)\:/\^(.*\^)^|/mnt/\L\1\E/\2^|g'^)

C:直下にbinフォルダを作成しrubocop.batを配置。

vscode拡張機能の設定を以下の様にした。

Rubocop: Execute Path: C:\bin\

基本設定

Render Whitespaceをallに変更した。

拡張機能

Japanese Language Pack for VS Code
Ruby
ruby-rubocop
Trailing Spaces
indent-rainbow
zenkaku

ショートカットキー

Ctrl+Bでサイドバー

Ctrl+@ターミナルへ移動できる。

Ctrl+1で1つ目のエディタ

とりあえずこれぐらい使えればとりあえず良さそう。

追記 2018/10/28

ターミナルがシンプルすぎたので軽く検索したらそれらしいカラースキーム設定があったので以下の様に設定した。

"terminal.background":"#090300",
"terminal.foreground":"#A5A2A2",
"terminalCursor.background":"#A5A2A2",
"terminalCursor.foreground":"#A5A2A2",
"terminal.ansiBlack":"#090300",
"terminal.ansiBlue":"#01A0E4",
"terminal.ansiBrightBlack":"#5C5855",
"terminal.ansiBrightBlue":"#01A0E4",
"terminal.ansiBrightCyan":"#B5E4F4",
"terminal.ansiBrightGreen":"#01A252",
"terminal.ansiBrightMagenta":"#A16A94",
"terminal.ansiBrightRed":"#DB2D20",
"terminal.ansiBrightWhite":"#F7F7F7",
"terminal.ansiBrightYellow":"#FDED02",
"terminal.ansiCyan":"#B5E4F4",
"terminal.ansiGreen":"#01A252",
"terminal.ansiMagenta":"#A16A94",
"terminal.ansiRed":"#DB2D20",
"terminal.ansiWhite":"#A5A2A2",
"terminal.ansiYellow":"#FDED02"

参考

VSCode + WSL

VSCodeで空白文字を見やすくする方法

VS Code の便利なショートカットキー

Base16 Terminal Colors for Visual Studio Code