1

With this .vimrc:

nnoremap [ :lp^M
nnoremap ] :lne^M
filetype plugin on

vim becomes sluggish when switching between "errors" of location list with square brackets. As opposed to using lprevious/lnext directly. The same goes for mapping brackets to cprevious/cnext.

Everything is okay without enabling filetype plugins (just filetype on). Or if filetype plugin on is executed after vim has started. Or if vim is started as follows: vim -u ~/.vimrc.

  • 6
    The ftplugin for your language probably has mapping starting with [ and ] which may explain that sluggishness: if you have something mapped to ]] ("next method" in python files), for example, Vim will wait a bit in order to see if you want ] or ]]. – romainl May 21 '15 at 19:54
  • 1
    Indeed, you're right. First, if you post an answer, I'll accept it. Also, can you explain by any chance why everything is fine if filetype plugin on is executed after vim has started? – x-yuri May 21 '15 at 20:03
1

Thanks to @romainl, it turns out the delay is caused by ftplugin defining mappings starting with [.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.