16

GitHub - antoinemadec/FixCursorHold.nvim: Fix CursorHold Performance.

 2 years ago
source link: https://github.com/antoinemadec/FixCursorHold.nvim
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Fix CursorHold Performance

Rationale

This plugin exists for two reasons:

  1. fix neovim CusorHold and CursorHoldI autocmd events performance bug
  2. decouple updatetime from CusorHold and CursorHoldI (works for Vim and Neovim)

1., fixes slowdowns and untriggered events

2., you can now use small delays for CursorHold without writing the swap file 10x/sec (see :help updatetime)

This will result in more snappiness for plugins using those events, such as: coc.nvim, vim-gutter, tagbar, vim-devicons, vim-polyglot, etc.

Installation

Make sure to have the following plugins in your vimrc:

Plug 'antoinemadec/FixCursorHold.nvim'

Configuration

" in millisecond, used for both CursorHold and CursorHoldI,
" use updatetime instead if not defined
let g:cursorhold_updatetime = 100

License


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK