Questions tagged [quickfix]

Questions about the usage of quickfix commands and quickfix windows.

Filter by
Sorted by
Tagged with
20
votes
4answers
3k views

Quickfix support for Python tracebacks

Say I have a python script with a runtime error: $ cat example.py #! /usr/bin/env python3 a = 1/0 which gives: $ python3 example.py Traceback (most recent call last): File "example.py", line ...
13
votes
3answers
3k views

How do I have buffers listed in a quickfix window in Vim?

Using vim editor, a common task is to browse buffers. I now use standard commands like :ls or a :bnext. In fact I set in my .vimrc: "move amongs buffers with CTRL map <C-J> :bnext<CR> map ...
13
votes
2answers
8k views

How to auto fix common linting errors reported via syntastic?

I started using syntastic plugin with vim to report lint errors in my javascript code. I also integrated eslint with syntastic, and it shows me nice errors, warnings in case they are present as per ...
12
votes
1answer
771 views

Make cnext and cprevious loop back to the begining

If I run :cnext when I'm already at the end of the quickfix list I get the error message E553: No more items and nothing happens. Instead of this, when I enter :cnext at the end of the list, I would ...
11
votes
2answers
878 views

Neomake hanging when using eslint

I have been following the following two tutorials to try and set up eslint and Neomake: Linting code with Neomake and Neovim Linting code with Neovim and Neomake - ESLint edition So I have the ...
10
votes
1answer
807 views

How to map Enter to custom command EXCEPT in quick fix?

I've remapped <cr> (enter) to za so I can quickly open/close folds. However, now when I use the quickfix window and hit enter it no longer jumps to the line with the error (because it's trying ...
9
votes
6answers
1k 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.
8
votes
1answer
3k views

Open quickfix in vertical split

If I use the command :copen the quickfix buffer will be opened as a horizontal split. Is there a way (a command) to open it in a vertical split instead?
8
votes
2answers
844 views

How do I make list of search results editable?

There are several times, I need to grep for some_pattern in some XHTML files (many a time, file count in a specified folder goes beyond 10K+). Previously, I have used Lugaru's Epsilon Programmer's ...
8
votes
2answers
319 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 ...
7
votes
1answer
356 views

Enable cursorline and cursorcolumn after Quickfix window is opened

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 ...
5
votes
2answers
632 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 ...
5
votes
2answers
266 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 ...
5
votes
2answers
817 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
372 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,...
5
votes
1answer
983 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 ...
4
votes
3answers
2k views

How to make <enter> open new tabs for the quickfix window when it is opened with “tab copen” including the first time?

I want to work with quickfix without ever having a split window. So I've set: set switchbuf=newtab as mentioned at https://stackoverflow.com/questions/6852763/vim-quickfix-list-launch-files-in-new-...
4
votes
1answer
2k views

How to automatically set wrapping for quickfix window?

I'm using Dispatch.vim, and often when there's a test error, some lines in the quickfix list are really long. I don't use soft wrapping for my code, so quickfix also isn't wrapped. Is it possible to ...
4
votes
2answers
2k views

Showing colors in vim's quickfix window from Dispatch tasks

I'm currently using vim-dispatch to run tests on my code which outputs the test results to the quickfix panel via tmux. However, all colors seem to be disabled in the output. There's this two year ...
4
votes
2answers
1k views

Quickfix with makeprg running in a different directory

How can I start a build with my makeprg running in a different directory than the working directory of vim and still catch errors in quickfix so that I can jump between them? The problem is that ...
4
votes
1answer
142 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 ...
4
votes
1answer
796 views

Calling vimgrep so that results from the current file are on top?

I would like to search for some pattern with :vimgrep in the current directory: :vimgrep /pattern/ * However this returns the results by filenames ordered alphabetically. If I run :vimgrepadd the ...
4
votes
1answer
3k views

How to redirect the output of a command as the quickfix list to a vim server / function?

When I click on a link in thunderbird and firefox is already running, it doesn't open a new window, just a new tab. I want the same thing for vim: no matter where I am and how I send a bunch of files ...
4
votes
1answer
586 views

How do I write a multi-line message to the quickfix or location list?

I've got a program that spits out multi-line messages separated with something other than a newline. I want these messages to show in the quickfix and location lists spanning multiple lines as ...
3
votes
2answers
1k 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 ...
3
votes
2answers
798 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 ...
3
votes
2answers
1k 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 :...
3
votes
2answers
368 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 ...
3
votes
2answers
242 views

Quickfix window not displaying stderr messages?

After running :make, the quickfix window displays the compile command and other stdout messages from the makefile, but it doesn't display any errors. Everything but stderr messages are displaying. How ...
3
votes
1answer
103 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 ...
3
votes
1answer
220 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 ...
3
votes
2answers
3k 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 | ...
3
votes
3answers
1k views

How to show quickfix without jumping to quickfix window?

I'm writing small liniting 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:...
3
votes
1answer
559 views

How do I run Cakephp's tests (PHPUnit) and output it to QuickRun or other window?

Is there a way to run tests of the current opened file and get output in other window like vim-QuickRun does? Right now I'm running tests by the command in command line: /vagrant/my_project/app/...
3
votes
1answer
388 views

More error context in the QuickFix window?

The output of certain compilers (e.g., LaTeX) is incredibly difficult to parse using an error format string. There are always edge cases that leave out the context of errors. So, is there any way I ...
3
votes
1answer
486 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) ...
3
votes
1answer
165 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 ...
3
votes
2answers
584 views

Overriding highlighting style for one syntax

My colour scheme (morning) doesn't play nice with the quickfix window: I cannot read the selected item's location, because the foreground and background colours are the same. Because of this I want to ...
3
votes
0answers
139 views

How can I display multiple lines in the same compiler error when using :cn?

I am using Vim for Rust development. I have a custom error format that works very well, except that newline characters in error messages are suppressed when scrolling through errors with :cn. This ...
2
votes
3answers
1k 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 ...
2
votes
1answer
384 views

uneven quickfix window output from Ack/Ag

For some reason I get, what I call an "uneven" output from Ack/Ag in the quickfix list window. My project directory structure is the following: /home/user/projects/myproject | ---- llvm-or1k | -...
2
votes
1answer
63 views

load quickfixlist into a specific window

I'm not interested in loading an item into a specific window. I'm interested in opening/loading quickfix list into a specific window/pane. Searched online everywhere, but couldn't find it. Does anyone ...
2
votes
1answer
68 views

Why does `:cdo print` not show full output?

:cdo print command (intended to print every line in the quickfix list), shows generic file information instead of line output for some quickfix entries. Why is this? The following example is taken ...
2
votes
3answers
110 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 ...
2
votes
1answer
74 views

Open quickfix Window Only, Don't Jump To First Result

Is there a way to open just the quickfix list without jumping to the first result when using :lt? I am using :lt to populate the location list with tags that match with the following binding: nmap &...
2
votes
1answer
56 views

visit file from quickfix list without populating oldfiles

I like consulting my oldfiles to see what I've been working on recently and to make it easy to find files that are buried deep in various directories. Before I started using the grep and make commands,...
2
votes
1answer
39 views

How to put the output of a function call into quickfix list?

I have the following function that runs eslint project wise: function! EslintProject() " Allows using eslint --format compact output with quickfix list set errorformat+=%f:\ line\ %l\\,\ col\ %c\\...
2
votes
1answer
50 views

Why does this binding break the quickfix window? [duplicate]

If I have this vimrc: set nocompatible nnoremap <C-m> ^^ When I try to open a file from the quickfix window by pressing enter nothing happens. If I comment out the last line, so the vimrc is ...
2
votes
1answer
176 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
1answer
419 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 ...