Questions tagged [quickfix]

Questions about the usage of quickfix commands and quickfix windows.

0
votes
2answers
23 views

How to use setqflist to add an entry to the quickfix list

I'd like to be able to define my own functions that add certain kinds of line to the quickfix list, or set it to those in its entirety, without having to go via the filesystem with a made-up errorfile ...
0
votes
1answer
24 views

Go to next quickfix entry, removing current?

I frequently find myself going through the quick fix list, making my quick fix, with :cn and then quitting :q when I've finished ... and then :q again to also close the quickfix list. Is there a way ...
2
votes
0answers
29 views

How can I make 'lnext' run 'lfirst' if it needs to be?

I use ALE for finding syntax errors in code in vim, which populates the loclist with any errors found. However, when I first open a file with errors, which populates that list (I have g:...
1
vote
2answers
49 views

Plugin to show enclosing indentation levels

I'm looking for functionality which may or may not exist. Basically, I'd like to have a location list split at the top of each writable buffer which shows the last line of each enclosing indentation ...
1
vote
0answers
43 views

Changing how the quickfix list displays matches

I have the habit of leaving comments in my C source files like // @TODO or // @CHECK to quickly be able to get back to where I may have things to do. I can already match those in pretty much any ...
2
votes
2answers
112 views

How can I close the quickfix window and go back to the file I was editing

I use gutentags and gutentags-plus for generating and managing tag files. When I use the key combinations setup by them ( cX usually ), it opens the relevant lines in a quickfix window and I can use :...
1
vote
1answer
41 views

Echoing a message when grep has no result

Is there a way echoing a message if grep has no result and getqflist() is empty? I've tried this, but it doesn't work: au QuickFixCmdPost grep call g:GrepPostActions() function! g:GrepPostActions()...
0
votes
1answer
47 views

Modify Quickfix to ignore paths outside project

I have been learning about quickfix recently, trying to make it work well with pytest to that end I provided my own makeprg and efm. So far everything is great except that pytest frequently traces ...
2
votes
0answers
39 views

Quickfix go to next error of specific type

I am starting to use quickfix to handle my latex compilation process. I found the vim-latex package (https://github.com/vim-latex/vim-latex) but I am only interested in the quickfix part, and I want ...
3
votes
1answer
64 views

Skip the quickfix list when buffer switching using :bn

Often when editing LaTeX files, you are constantly switching between your .tex, .sty and .bib files which are often in their own buffer. To navigate between those, I use the :bn and :bp commands ...
1
vote
0answers
51 views

Add conceal in function

Trying to maintain add conceals to the generated location list, but I can not figure it out. The current workaround is to add it manually everytime through the vim commandline, like: : set ...
2
votes
1answer
43 views

Maintain concealed text in quickfix buffer

Would like to maintain the concealed text in the locationlist (aka quickfix) from the targeted file, which has the extension .rex . For example, the target file is has: +- concealed to ± The ...
1
vote
1answer
75 views

function: sort output alphabetically

This function outputs data between braces as joined lines in a quickfix window. The output is sorted based on line numbers. I'm searching for a method to sort the data alphabetically. I tried to ...
1
vote
0answers
37 views

How to write to a temproary buffer in a plugin

I've started to write my first vim plugin, a simple timer. I want to be able to set a timer for an arbitrary amount of time, and have it notify me once that time has passed. I've got it all working, ...
2
votes
1answer
76 views

Close multiple quickfix windows

I love the quickfix feature in vim. It also works flawlessly in most cases. But when I work with LaTeX documents, it leads to funny behavior. I don't think it's relevant, but I have the LaTeX suite ...
2
votes
2answers
89 views

how to check whether the location list for the current window is open

Using getwininfo it is possible to determine whether an window is a quickfix window or location list window. But once a location list window is found, how can I know which window it is associated ...
2
votes
1answer
103 views

how to get the index of the current item in quickfix list

I can use getqflist() to get the whole list. But how can I know which is the currently selected item in the list? It is used if :cc [nr] without specifying nr. It is also used for cnext and cprev. But ...
1
vote
1answer
98 views

Give variable to makeprg

I'm trying to put the output of a command into a QuickFix list when a particular key is pressed. That command takes as its argument the word under the cursor, so my function looks basically like this (...
1
vote
1answer
50 views

Put error into quickfix window

I can customize some error display in my file like highlight all white space at the end of each line by: :match ErrorMsg /\s\+$/ Can I put all the error I found into quickfix windows that I can go ...
2
votes
2answers
436 views

Using global command on Quickfix entries [duplicate]

I find and replace a pattern in all the files in my project (which is a big one). After the search is done, quickfix window is opened with the matches. The matches are in different files in different ...
0
votes
1answer
19 views

How to automatically return to where the cursor was before executing cdo?

Is it possible to automatically return to where the cursor was before running :cdo command? Currently, the cursor ends in the last file in the quickfix, then I have to navigate back to where I was ...
3
votes
2answers
340 views

How to set a shortcut to run make in Vim and show the output

I'd like to run make and display the output when I press Ctrl+m in Vim. I know how to run make and display the output while in command mode, thanks to this StackOverflow answer, namely with: :make | ...
1
vote
3answers
517 views

Open quickfix window without focusing it

I run my make commands asynchronously in vim with the asyncrun plugin. I use this code in my .vimrc to open the quickfix window automatically everytime I run an asynchronous make command in order to ...
0
votes
1answer
254 views

How to differentiate quickfix window buffers and location list buffers?

Recently I've been playing with my statusline and I'm coming to a point where I want to set a different highlighting group for the statusline of my quickfix window, location list window, and the other ...
7
votes
2answers
203 views

How to capture errors from make in terminal window

Vim 8.1's release note seems to indicate that you can feed output from make running in a terminal window to a quickfix list, but I couldn't find any detailed explanation. Is there a way to do this ...
2
votes
1answer
179 views

Quickfix navigation not working properly

I'm trying to lint my C files inside vim. I know that quickfix should help in this case. I found the following pc-lint file maintained by Craig Emery. I have this file in vim/vim80/compiler. if ...
1
vote
0answers
178 views

Quickfix list displays each line of log file

I'm trying vimtex. Probably I haven't read the docs well enough, but in my system (linux ubuntu 14.04.4 LTS, gvim 7.4) the quickfix list is populated with every single line of the log file when ...
1
vote
0answers
83 views

How do I remove duplicate quickfix messages?

I have a rather annoying case of duplicate messages being displayed whenever I go put my cursor on a line. Whenever my cursor lands on the line, a message like [Error]not found: type Playfield is ...
1
vote
0answers
160 views

How to keep results of grep open while saving?

When I get the results of a search (whether via :cw or the Ack.vim plugin), it goes into the quickfix window. I then open the file by hitting enter, make changes, and save the file. The quickfix ...
0
votes
1answer
179 views

How do I open a quickfix result in a new buffer?

When I have the quickfix window open (e.g. from :grep foo<cr>:cw) I can go to the window and hit Enter and it will open the file under the cursor in an existing buffer. Is there a way to open ...
5
votes
1answer
247 views

Is there a way to quickly jump to signs?

Vim 8 has introduced the sign feature, that allows people to mark locations within a file. I noticed there is a :sign jump command to jump to a sign, but it requires a buffer and an id as an argument,...
1
vote
0answers
21 views

Correct way to add “context” attribute to an existing quickfix list

Recent versions of Vim provide each quickfix list with a unique id and allow you to set an arbitrary "context" attribute on the list. I'd like to set the "context" on an existing quickfix list. This ...
0
votes
0answers
105 views

Errors/warnings from :make are not shown correctly

So far I've been compiling projects from within Vim by suspending it with Esc and Ctrl + Z, running make (btw, I'm using the gfortran compiler and, should it be important, using the mpifort wrapper, ...
1
vote
0answers
37 views

How to synchronize between NORMAL and Quickfix window?

:vimgrep can list search result in the Quickfix window. :cn can jump to next matching and NORMAL window is also updated. If switch to NORMAL window and n, it will jump to next matching place, but ...
1
vote
1answer
450 views

How to go to quickfix window?

I know there is :copen command which opens quickfix window but it doesn't immediately switch to it(till it open). How can I wait for it to be sure my next commands in script would be executed in ...
0
votes
1answer
212 views

Errorformat not recognizing my errors

I have errors which looks like this: [Error] Z:\absolute\file\path.cpp(42): error C2065: 'foo': undeclared identifier [Info] Z:\another\file\path.cpp(42): error C2050: 'foo': switch expression not ...
4
votes
2answers
401 views

Go to quickfix next/previous (cnext/cprevious) relative to current file position?

Is there any built-in way to jump to the next or previous error in the quickfix/location list relative to the current cursor position? Say my quickfix list looks like: ---quickfix list--- a.txt - ...
5
votes
1answer
578 views

need help with vim errorformat to parse multi-line make (gcc) output

I'm struggling to get vim (8.0 (2016 Sep 12)) to parse the output of my build system, and need help with defining my errorformat. The default gcc efm appears to not be matching any lines, so in ...
3
votes
1answer
265 views

quickfix window and location list open at the same time causes weird resize

I have two different plugins doing different things while writing Go. Sometimes the plugin that runs the testing (vim-go) will write to the quickfix window, while the plugin that does linting (ALE) ...
0
votes
1answer
82 views

vim :make :cwindow, I need error length character limit larger than 1000

I am compiling a program with :make command, then I examine g++ errors using :cwindow. The problem is that the error produced by g++ is longer than 1000 characters and it is cut. Currently I have to ...
1
vote
0answers
32 views

Creating QuickFixed file to apply QuickFixes via diff

TL;DR I have macros in each %m captured by errorformat after :make. I'd like to have a copy of the file in another split and apply all the macros (so to have a fixed file) and then do a :windo ...
1
vote
2answers
270 views

QuickFixCmdPost autocommand after Glog

I run Glog! from fugitive to populate the quickfix window and set the following autocmd for QuickFixCmdPost (The following questions general and are not specific to Glog, I just use it as example) ...
3
votes
2answers
397 views

autocmd with quickfix window

How can set BufEnter or WinEnter autocmds for entering quickfix window? I tried autocmd WinEnter quickfix echo 'winenter' autocmd BufEnter quickfix echo 'bufenter' None of them works. I doubt that ...
2
votes
1answer
132 views

Is it possible to align the results in the quickfix list in columns

Currently, when I view the quickfix list with :cw, the columns/pipes are not aligned, as in this example: I wonder if there is an option in vim or a plugin to rearrange the pipes so that they align ...
2
votes
1answer
305 views

Is there a way to update the quickfix entries after running cdo/cfdo?

I usually find myself running pattern replacements on the results of vim-fugitive's Ggrep :Ggrep someFunctionName :cfdo %s/someFunctionName/someOtherName/g | update And that works great but I can ...
5
votes
3answers
511 views

How to load list of files in commit into quickfix

Using git how can I load the list of files in the current commit into Quickfix window? Code Review didn't pass and I want to just fix them one by one.
3
votes
1answer
108 views

Break line even if it fits the screen

I think everyone knows that vim can't display multiline messages in quickfix (yes, I know that it can parse them and show them as one big line). I thought about ways to workaround this and thought ...
4
votes
2answers
404 views

Which buffer quickfix file is opened in?

One thing that drives me crazy is unpredictable quickfix behaviour. Say I am editing a file, then I split the window and would like to find something and open in that buffer. I use :Ag whatever to ...
3
votes
3answers
909 views

How to show quickfix without jumping to quickfix window?

I'm writing small limiting plugin and I want to show errors in the quickfix as soon as errorfile changes. fu! OpenErrors(job_id, data, event) let l:winid = win_getid() let l:output = split(a:...
0
votes
1answer
92 views

How can I prevent vim from changing the % register when entering non-modifiable windows?

My workflow revolves around having NerdTree opened with a quickfix at the the bottom and one file opened in a buffer. I often grep within my file only by using the % shortcut in my grep command. I ...