cVimは、Vimぽい操作で動かせる、Google Chrome拡張機能で、前にキーバインドなどをカスタマイズしました。

キーバインドなどを変更した画面の下側で、CSSをカスタマイズ出来るようになっています。
今まで殆ど弄っていませんでしたが、見づらい時もあるので見やすいように変えていきます。

CSSの設定する場所で、NormalVimとモードが変えられますが、Normalをカスタマイズします。
ところで、Vimは何に使うのだろう?

環境

  • Windows10 64bit
  • cVim 1.2.99

コマンドバーで表示されるフォントやサイズを変更

cVim buffer

右の黒い部分は広告です。

  • フォントの種類を固定幅フォントに
  • フォントサイズを14ptへ拡大
1
2
3
4
5
6
7
#cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results,
.cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left,
.cVim-completion-item .cVim-right {
font-family: monospace;
font-size: 14pt !important;
-webkit-font-smoothing: antialiased !important;
}

Chromeのフォント設定(chrome://settings/fonts)で、固定幅フォントをRictyに設定していてこれを使いたかったので、フォントを固定幅フォントの指定に。

フォントサイズは、初期だと10ptと小さいので大きく。

Hit a Hintなどのフォントやサイズ、表示位置などを変更

cVIm Hit a Hint

右の黒い部分は広告です。

  • フォントの種類を固定幅フォントに
  • フォントの表示位置を上に-0.2em移動
  • 領域内のスペースを1pxへ縮小
  • フォントサイズを14ptへ拡大
  • フォントを小文字表記へ

94行目

1
2
3
4
5
6
#cVim-link-container, .cVim-link-hint,
#cVim-hud, #cVim-status-bar {
font-family: monospace;
font-size: 14pt !important;
-webkit-font-smoothing: antialiased !important;
}

109行目

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.cVim-link-hint {
position: absolute;
color: #302505 !important;
background-color: #ffd76e !important;
border-radius: 2px !important;
margin-top: -0.2em;
padding: 1px !important;
font-size: 14pt !important;
font-weight: 500 !important;
text-transform: lowercase !important;
border: 1px solid #ad810c;
display: inline-block !important;
vertical-align: middle !important;
text-align: center !important;
box-shadow: 2px 2px 1px rgba(0,0,0,0.25) !important;
}

.cVim-link-hint_match {
color: #777;
text-transform: lowercase !important;
}

Hit a Hintのフォントの表示位置が少し下に表示されていると感じるときがあったので、少し上に移動させました。

Hit a Hintのフォントはフォントの種類次第でもありますが、フォントサイズが大きければ小文字のほうが見やすいかなと思っています。
大文字だと、EFIT辺りが、ぱっと見た時に区別が付きにくいと思う。

コマンドバーを半透明に

cVimでコマンドモードの候補などの表示を半透明にする

opacityを追加して透明度を弄ります。

cVim command-bar opacity

9行目

1
2
3
4
5
6
7
8
9
10
11
12
13
#cVim-command-bar {
position: fixed;
z-index: 2147483646;
background-color: #1b1d1e;
color: #bbb;
display: none;
box-sizing: content-box;
box-shadow: 0 3px 3px rgba(0,0,0,0.4);
left: 0;
width: 100%;
height: 20px;
opacity: 0.90;
}

44行目

1
2
3
4
5
6
7
8
9
10
#cVim-command-bar-search-results {
position: fixed;
width: 100%;
overflow: hidden;
z-index: 2147483647;
left: 0;
box-shadow: 0 3px 3px rgba(0,0,0,0.4);
background-color: #1c1c1c;
opacity: 0.90;
}

とりあえず、opacity: 0.90;で設定して運用していますが、この値だとあまり透過しないので好みですね。
ちなみに、0に近くなるほど透明になります。

コマンドバーが邪魔で見えないときにお世話になるかもしれません。

設定ファイル

cVim.css

追記

2018-03-04

  • Hit a Hintなどのフォントやサイズ、表示位置などの変更を修正
  • ステータスバーのフォントサイズを10ptから14ptへ拡大

2019-08-18

  • コマンドバーを半透明に 追加