Currently, when I view the quickfix list with :cw, the columns/pipes are not aligned, as in this example:

enter image description here

I wonder if there is an option in vim or a plugin to rearrange the pipes so that they align in columns. csv.vim does something similar for csv files (see gif in the README).


Some more searching yielded the qf-layout plugin, which is working great in my initial tests!

In order to show only the basename instead of the entire filepath, I modified line 84 from

let l.filename = bufname(l.bufnr)


let l.filename = fnamemodify(bufname(l.bufnr), ":t")

It looks neat!

enter image description here

In case someone else finds this useful, I recommend adding something like the following to your .vimrc, and put the formatting you prefer first in the list. I changed from 'NOP' to 'vim_addon_qf_layout#DefaultFormatter':

let g:vim_addon_qf_layout = {}
let g:vim_addon_qf_layout.quickfix_formatters = [
    \'NOP' ]

PS This plugin works great together with the SpellCheck plugin which populates the quickfix list with misspelled words!

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.