Skip to content
Jean Guyomarc'h edited this page Jul 9, 2021 · 5 revisions

Blink and Color

Neovim provides the guicursor option to control the aspect, color and blink of the cursor. The following example of configuration provides a cursor that does not blink, and changes aspect when replacing or inserting.

set guicursor=a:blinkon0
set guicursor+=n-v-c:block-Cursor
set guicursor+=i:ver20-iCursor
set guicursor+=r:hor20-iCursor

You can change the color of the cursor by creating a highlight group and setting guifg (other parameters will be ignored). The example below shows how the default cursor color can be restored:

highlight Cursor guifg=#3399FF

Animation

Eovim proposes cursor animations, similar to what gnvim proposes, with a fine-grained configuration.

Turning Cursor Animations On and Off

Animations are turned on by default. This is configured through the g:eovim_cursor_animated variable. Animations are disabled if it is set to zero:

" Disable cursor animations. All cursor animation related parameters are ignored
let g:eovim_cursor_animated = 0

" Enable cursor animations
let g:eovim_cursor_animated = 1

Animation Duration

The animation duration is configured through the parameter g:eovim_cursor_animation_duration. It describes the time, in seconds, necessary for the cursor to move from one position to another. Cursor shapes are also animated. It is a floating-point value.

let g:eovim_cursor_animation_duration = 0.05

Animation Style

Animation can have several different animation styles. They are configured through the g:eovim_cursor_animation_style variable.

let g:eovim_cursor_animation_style = '<style>'

The following values for <style> are:

  • linear: the speed of the animation is monotonic.
  • accelerate: the animation ends faster than it started.
  • decelerate: the animation ends slower than it started.
  • sinusoidal: the animation's speed follows a sinusoidal tendency.