LoginSignup
0
2

More than 5 years have passed since last update.

Atomを半透明にするとvim-mode-plusのカーソルが表示されない問題の対処法

Last updated at Posted at 2017-06-10

この記事は

Atomを半透明にするとvim-mode-plusのカーソルが見えなくなってしまったので、カーソルを表示させるためのスタイルシートの設定を書きます。

vim-mode-plus以外の設定等はこちらや下の参考URLを参照してください。

Atomのウィンドウを透過させる方法

この辺が参考になります。ソースからビルドする必要があります。
Atomのウィンドウを半透明にする方法
Atomで透過ウインドウにする

src/main-process/atom-window.coffeeoptiontransparent: trueを追加してビルドすればOKです。
スタイルシートの設定は上記のサイトを参考にしてください。

vim-mode-plus用のスタイルシート

vim-mode-plusを使っている場合、コマンドモード時のカーソルが全く見えなくなってしまうので、style.lessでカーソルの色と透明度を指定します。
.cursor.blink-off .cursorで指定した色が交互に表示されますが、同じにしておけば点滅しなくなります。

※ベースはこちらからコピーさせてもらってますが、このサイトはvim-mode-plusでなく、vim-modeなので、そこだけ変更してます。

atom-text-editor.vim-mode-plus.normal-mode,
atom-text-editor.vim-mode-plus.operator-pending-mode,
atom-text-editor.vim-mode-plus.visual-mode
{
  // &, // only keep this if you want to see the cursor on non-focused tabs
  &.is-focused {
    // &::shadow, // shadow-DOM enabled
    &          // shadow-DOM disabled
    {
      // cursor color
      .cursor {
        // cursor styles
        background-color: rgb(90, 90, 250) !important;
        opacity: 0.6 !important;
        // visibility: visible !important;
      }
      .blink-off .cursor {
        // cursor style while blinking (if you so desire)
        background-color: rgb(90, 90, 250) !important;
        opacity: 0.6 !important;
        // visibility: visible !important;
      }
    }
  }
}

以上です。

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