Due to performance, I disable the cursorline and cursorcolumn in Vim. However, in the case jumping through a Quickfix window, it is hard to locate the cursor in the file. So I would like to enable cursorline and cursorcolumn automatically after a Quickfix window is opened (by whatever actions).Now I have the solution using the Autocmd like this:autocmd BufferEnter quickfix :bufdo set cursorline cursorcolumnIs this the proper solution? Any better idea?Thanks very much!
Enable cursorline and cursorcolumn after Quickfix window is opened
vimrc;autocmd;quickfix;cursorline
Create the file in ~/.vim/ftplugin/qf.vim (or $HOME/vimfiles/ftplugin/qf.vim if you are on Windows) with the following contents: Only do this when not done yet for this bufferif exists(b:did_ftplugin)   finishendifwincmd p  go to original windowset cursorlineset cursorcolumnwincmd p  back to quickfix windowThe ftplugin files are executed whenever the filetype is set for a given file buffer (quickfix and location window has the filetyp qf).Using the filetype plugin files instead of autocmds avoids cluttering your vimrc.You can find more details at :help ftplugin-name, :help 43 and Vim FAQ 26.8.Edit:The check on b:did_ftplugin is necessary to allow disabling it if necessary and to avoid loading it twice (see :help ftplugin).The let b:did_ftplugin = 1 is omitted from this file because the intent of this file is to increment the default filetype plugin for quickfix, and not override. If this line was added then the settings at $VIMRUNTIME/ftplugin/qf.vim would be skipped, as explained at :help ftplugin-overrule.