Questions tagged [quickfix]
Questions about the usage of quickfix commands and quickfix windows.
154
questions
0
votes
1
answer
638
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 ...
6
votes
1
answer
660
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
0
answers
43
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 ...
3
votes
0
answers
62
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 ...
2
votes
1
answer
1k
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
1
answer
626
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 ...
6
votes
2
answers
3k
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 - ...
6
votes
1
answer
2k
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
1
answer
873
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) ...
1
vote
1
answer
181
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
0
answers
40
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
2
answers
784
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)
...
7
votes
2
answers
2k
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 ...
6
votes
2
answers
538
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 ...
6
votes
1
answer
931
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 ...
11
votes
6
answers
2k
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
1
answer
267
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 ...
6
votes
2
answers
1k
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 ...
4
votes
4
answers
2k
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:...
0
votes
1
answer
142
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 ...
1
vote
0
answers
48
views
Can't hide quickfix before executing makeprg
I'm trying to hide the quickfix window while building, so that it doesn't show outdated info.
I can, of course, execute :ccl at any time to close quickfix. Additionally, I've used autocmd to call a ...
0
votes
1
answer
79
views
Would you ever want to start recording a macro from the quickfix window?
I'd like to map q to :cclose in the quickfix window, but I wonder if I'd be locking myself out of a world of wonderful macros by doing so.
Are there realistic scenarios where you'd want to be able to ...
3
votes
0
answers
653
views
Open quickfix in current vertical split
I usually use a layout of one vertical split and two different buffers. When i use :copen, the quickfix window always opens in the right split, regardless where my cursor is. Consequently, if my ...
2
votes
1
answer
279
views
Multiple buffers of the same file
I ran into a problem when using the quickfix feature of vim. When I open up my source file in vim, a buffer of that file is created, and its name is shown on the status bar, let's say main.cpp.
Then ...
0
votes
2
answers
1k
views
How to change the cursor line higlighting only for one window (namely the quickfix one)?
I want the cursor line in the quickfix window to be more distinguishable, than in other windows.
Initially I thought that there has to be some different highlight group, it seemly turned out to be ...
7
votes
1
answer
602
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 ...
3
votes
1
answer
502
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 ...
4
votes
1
answer
792
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 ...
5
votes
1
answer
1k
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 ...
11
votes
2
answers
1k
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 ...
1
vote
0
answers
362
views
Why the result file of cscope found in quickfix window can't be showed in file explorer?
When I configured cscope in vim, I have installed some plugins such as Minibufexplorer, but I found that when I use cs find s, the result could be showed in the quickfix, and none of the option file ...
13
votes
1
answer
1k
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 ...
15
votes
2
answers
9k
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 ...
3
votes
1
answer
1k
views
How to automatically open the location list window after using the :lhelpgrep command?
I have the following autocmds to automatically open the quickfix window or the location list window after executing a quickfix command.
augroup quickfix_window
autocmd!
autocmd ...
5
votes
0
answers
164
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 ...
3
votes
2
answers
933
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 ...
1
vote
2
answers
647
views
maven colored logging breaks filepath
If I use the color logging for maven, the file path is corrupted by the coloring syntax:
^[[1;31m[ERROR]^[[m /home/foo/bar/src/main/java/com/domain/bar/App.java
instead of
[ERROR] /home/foo/bar/src/...
5
votes
4
answers
3k
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-...
1
vote
2
answers
1k
views
Quickfix Window not Opening Automatically
I have realized that the quickfix window isn't opening automatically when it's supposed to. I have tested this on both Gvim and vim 7.4 on Windows 10 Version 10.0.10586 Build 10586. I have a few ...
8
votes
2
answers
1k
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 ...
3
votes
1
answer
633
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/...
6
votes
1
answer
4k
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 ...
1
vote
1
answer
322
views
Jump to linker errors in quickfix
How can I make linker errors jumpable in quickfix?
Example:
int foo(void);
int main(int argc, char* argv[]) {
foo();
}
Start up vim and run :set makeprg=gcc\ % and try :make. This produces a ...
22
votes
4
answers
6k
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 ...
2
votes
2
answers
455
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
|
-...
1
vote
1
answer
2k
views
Enter in Quickfix window gives "E73: tag stack empty" error
I am using the Lid.vim plugin to navigate my C++ project.
Once I run :Lid, it shows me the list of matching tags in the quickfix window.
When I switch to the quickfix window, select the occurence I'...
1
vote
2
answers
2k
views
Keeping quickfix jumps in the jump list
When I populate the quickfix window (say with grep or Ag.vim), I can scroll through the entries, and all the positions inside the quickfix window show up in :jumps. But as soon as I navigate away (say ...
7
votes
2
answers
3k
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 ...
12
votes
1
answer
2k
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 ...
5
votes
1
answer
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 ...