Questions tagged [quickfix]

Questions about the usage of quickfix commands and quickfix windows.

Vim provides a quickfix mode to speedup the edit-compile-edit cycle.

The quickfix commands allows the user to navigate between different position in a file where some error was found by a compiler.

For more details see :h quickfix.

163 questions
13
votes
1 answer

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 like vim to cycle back around to the first…
lwassink
  • 281
  • 1
  • 7
6
votes
2 answers

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 - line 1 a.txt - line 2 b.txt - line 6 b.txt - line…
RomainLettuce
  • 63
  • 1
  • 3
6
votes
1 answer

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 still see someFunctionName on the quickfix…
davidmh
  • 193
  • 6
5
votes
5 answers

How to make 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-tab Now: tab copen opens the quickfix window on a…
4
votes
1 answer

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 I have no way to extract this info.
doraemon
  • 1,667
  • 11
  • 27
4
votes
4 answers

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:data[0]) echom l:output[0] . l:output[2] …
user1685095
  • 1,141
  • 11
  • 24
3
votes
0 answers

Split instead of showing errors when opening file from quickfix

Is it possible to get behaviour like switchbuf=split, but only on error? I don't want tons of windows that comes with using switchbuf=split, but I don't want to see errors like "E37: No write since last change" and "E36: Not enough room". Is it…
idbrii
  • 641
  • 4
  • 14
3
votes
1 answer

How to make two windows equally high?

It seems that there is an issue with window-resize with Quickfix list window. In case of regular window and quickfix list window, how to make them equal in high? The CTRL-W- (and the CTRL-W+) works, but CTRL-W= - doesn't work! Observed in GVIM 8.1…
IvanDi
  • 99
  • 3
3
votes
0 answers

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 Quickfix windows is unchanged. Can we make NORMAL and…
Fisher
  • 1,086
  • 2
  • 13
  • 28
3
votes
0 answers

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 cursor is in the left split, and I issue the commands…
lsund
  • 315
  • 2
  • 5
2
votes
2 answers

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 | ---- clang-or1k I did a search with Ag using the…
flashburn
  • 689
  • 6
  • 17
2
votes
1 answer

Cfilter match from begginning of line

Say I have entries like this in the quickfix window: manage.py|7 col 54| os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dist.plug.from.settings') project/urls.py|29 col 6| from dist.plug.apps import PlugConfig project/urls.py|30 col 6| from…
run_the_race
  • 893
  • 7
  • 9
2
votes
1 answer

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, the oldfiles list only contained files I had…
Greg Nisbet
  • 1,839
  • 14
  • 27
2
votes
1 answer

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 know how to do it?
flashburn
  • 689
  • 6
  • 17
2
votes
0 answers

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:ale_lint_on_enter set to 1), no error is highlighted. I like to…
Andrew Ferrier
  • 6,729
  • 7
  • 28
  • 41
1
2 3