sjl / vitality.vim

Make Vim play nicely with iTerm 2 and tmux.
http://github.com/sjl/vitality.vim
MIT License
320 stars 30 forks source link

support xterm and cursor colors #12

Closed grota closed 7 years ago

grota commented 12 years ago

this patch provides support for xterm. Both focus report and tmux wrapping work. The cursor shape is changed to what xterm supports, i.e. a blinking underline. The patch also provides the user to change the cursor color (both insert and normal mode colors are supported)

rstacruz commented 11 years ago

:+1: would be a great service to all the Linux users out there.

grota commented 11 years ago

IIRC this pull request of mine is quite resource intensive. Today I roll with 4 simple lines (and an appropriate color scheme)

au InsertEnter * hi CursorLine ctermbg=17
au InsertLeave * hi CursorLine ctermbg=234
autocmd WinLeave * setlocal nocursorline
autocmd WinEnter * setlocal cursorline

Here's the thing in normal mode imgur and here in insert mode imgur

Also, if you are in gnome, use terminal vim, and still want a vertical cursor, check this article out.

sjl commented 7 years ago

Someone should fork Vitality and make an Xterm version. But I really don't want to go down the rabbit hole of supporting lots of terminals -- iTerm and tmux was enough to fry my brain.

HaleTom commented 7 years ago

Check out https://github.com/tmux-plugins/vim-tmux-focus-events which supports: