coolwanglu / neovim-e

Electron UI for Neovim
MIT License
271 stars 29 forks source link

[idea] Solid cursor. #35

Open trusktr opened 9 years ago

trusktr commented 9 years ago

Can you add an option to change the block cursor from outlined to solid? A good reason to have a solid cursor is because in some terminals an outline cursor indicates the window isn't in focus.

raghur commented 9 years ago

+1 came here looking for a config.cson option for this...

raghur commented 9 years ago

Editing src\nvim.css seems to at least to get us partially there...

#nvas-cursor {
  position: absolute;
  box-sizing: border-box;
  border: 1px solid;
  background-color: rgba(244,244,244,0.3);
}
trusktr commented 9 years ago

@raghur Oh wow, I forgot it's just web tech. That was easy!

raghur commented 9 years ago

Also, this fixes insert mode cursor

.insert-mode #nvas-cursor {
  border: 0;
  border-left: 2px solid;
  background-color: transparent;
}
trusktr commented 9 years ago

I like the transparent cursor:

#nvas-cursor {
  position: absolute;
  box-sizing: border-box;
  background: rgba(255,255,255,0.3);
}

:smile:

coolwanglu commented 9 years ago

Strictly speaking, we should probably inverse the fg/bg color under a solid cursor, yet currently we do not store the colors of each character. Semi-transparent cursor is a nice hack, I'm glad that it works for you.

trusktr commented 9 years ago

@coolwanglu Yeah, having the cursor color the inverse of the letter would be neat! Another neat hack would be to fill in the last empty space in the visual selection (you know how vim leaves the background of the character that the cursor is on empty when in VISUAL mode?)