Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [quickfix]

Questions about the usage of quickfix commands and quickfix windows.

Filter by
Sorted by
Tagged with
2 votes
1 answer
59 views

Trying to create syntax checking for Perl

I would like to have a quick way to check the syntax of the current Perl file. Suppose we have following incorrect file: #!/usr/bin/perl sub aaa { dfgdf dfgdfg if ) {} sub bbb { } ...
user4035's user avatar
  • 179
0 votes
1 answer
31 views

Weird characters in the quickfix list (wsl + docker)

I run Vim in WSL and I build my C++ project in a docker container. I managed to setup everything, but after the build process I get weird characters in the quickfix list, like the following: [01m[/...
Barzi2001's user avatar
  • 606
0 votes
3 answers
43 views

Quickfix list: I changed the paths of listed files but the old paths are considered

I build my c++ software inside a docker image while running Vim in the host. Although I succeed in building through :make by setting set makeprg=./build_script.sh, where ./build_script.sh calls docker ...
Barzi2001's user avatar
  • 606
0 votes
1 answer
27 views

How do I close the quickfix window inside a user-defined function?

If the quickfix window is open, I can close it with :cclose. I can map that to a shortcut key: vim.keymap.set('n', '<C-q>', ":cclose<CR>") vim.keymap.set('n', '<C-q>', vim....
Sasgorilla's user avatar
0 votes
1 answer
73 views

Error when adding new string to errorformat in init.lua?

In Neovim I want to jump through Python traceback in the quickfix list. To do that, I set the following option :set errorformat+=%.%#File\ \"%f\"\\,\ line\ %l%.%# and this works well. What ...
Fabz's user avatar
  • 1
1 vote
2 answers
103 views

Integration of mypy and QuickFix window

I would like to have a keyboard shortcut to run mypy on the current buffer put the output in the QuickFix window I only want mypy to run and populate the QF window on demand, not constantly. I do ...
backseat's user avatar
  • 131
1 vote
1 answer
48 views

How can I detect if quickfix window is open?

I can detect if nerdtree window is open : let l:nerdtree_open = bufwinnr(t:NERDTreeBufName) != -1 I can detect if tagbar window is open : let l:tagbar_open = bufwinnr('__Tagbar__') != -1 Now I want ...
Jumogehn's user avatar
  • 165
1 vote
2 answers
39 views

How can I reload the contents of my quickfix, but with a different errorformat?

I use :make to run a python script to build a C++ project. Usually, the output errors are C++ errors and :compiler msvc parses them correctly. Rarely, the error is a python one and I want :compiler ...
idbrii's user avatar
  • 661
0 votes
1 answer
277 views

How to show and use Quick actions/Context action in Neovim?

JetBrains IDEs and VSCode have this feature where they show some actions that you can do to handle a warning like in the pictures below. PyCharm's Context action: VSCode's Quick fix In Neovim, it ...
Minh Mốc's user avatar
0 votes
0 answers
642 views

FZF-Vim with ripgrep: load results into quickfix list?

I used to use the vim-ripgrep plugin to integrate with ripgrep (:Rg), which would load the results from rg into a quickfix list, so I could go back and forward over them with [q and ]q. Now I use the ...
fanaugen's user avatar
  • 101
0 votes
1 answer
247 views

How to display vim-test output in a quickfix window?

I have installed vim-test, and setup the following pytest executable in my .vimrc: let g:test#python#pytest#executable = 'python3 -m pytest' When I call :TestFile, pytest runs in a background shell ...
Paul Rougieux's user avatar
1 vote
1 answer
452 views

Fundamental difference between location list and quickfix list

I know about the practical differences (e.g., one Vim session can have only one quickfix window but multiple location list windows, etc.), but what are the essential differences? When should I prefer ...
3N4N's user avatar
  • 5,764
0 votes
1 answer
69 views

Convert some quickfix messages into tags rather than errors

Often times I get way too many diagnostics from my compiler (eg., things beginning note: which just provide context for the actual error), and I do not want to descend into these when I type :cn. Can ...
sh1's user avatar
  • 143
1 vote
1 answer
422 views

How do I automatically open/close location or quickfix lists when they are populated by ALE?

I'm switching from the syntastic plugin to the ALE plugin. In syntastic there was an option g:syntastic_auto_loc_list that would automatically open the location list after it had been populated. If ...
FalcoGer's user avatar
  • 149
1 vote
1 answer
592 views

Modify quickfix list and reload with :cbuffer

I'm building a project with a large amount of warnings. To get through those I'd like to address certain warnings first. I use :make and then I want to filter to quickfix list. I do this as follows (I'...
pschulz's user avatar
  • 113
1 vote
2 answers
326 views

Is it possible to populate the quickfix list with files based on criteria that are independent of the files content?

I am interested in populating the quickfix list with filenames selected according to a criteria that is independent of the files content. For example, I want to populate the quickfix only with python ...
Barzi2001's user avatar
  • 606
1 vote
1 answer
411 views

How to correctly set up :make for building Vim?

My question could fairly be a duplicate of this, but I hope I'm making it critically different by asking about :makeing Vim itself and having a meaningful quickfix window. (In reality, my use case is ...
Enlico's user avatar
  • 2,214
2 votes
3 answers
119 views

How to fold away C++ system headers in quickfix window?

If I make a mistake in a class in some C++ code, I'll typically get a ton of messages from the compiler about how hard it's tried to find something suitable in system header files. This floods the ...
sh1's user avatar
  • 143
3 votes
3 answers
280 views

How to create qf or location list from results of shell command

I often open the results of an external project-wide find | xargs grep command into a new tab like this :tabnew|read !find . -iname \*.py | xargs grep -n 'pattern' I then use gf to open the matching ...
textral's user avatar
  • 133
0 votes
1 answer
103 views

How can I make 'quickfixtextfunc' work with cfilter using a vim9's "def" function?

On Windows 10, using gvim, when editing a file like the following example: foo foobar baz As long as I use a function and not a def, I can do the following and Cfilter will work as expected: :...
Minh-Tâm TRAN's user avatar
2 votes
1 answer
220 views

Vimgrep: select different files in quickfix list without switching window?

Let's say I have some file a asdf b asdf c and search :vimgrep /asdf/g %, and open the quickfix list :copen. Now I can navigate between the two results using j/k and jump to said result using Enter. ...
flawr's user avatar
  • 185
0 votes
2 answers
187 views

QuickFix window default postion

It seems that the QuickFix window is created on the bottom of the upmost right vertical split. If I start with two splits: When I open the QuickFix window (:copen) the QuickFix windows is created as ...
Vivian De Smedt's user avatar
0 votes
0 answers
23 views

Entering command-line window from quickfix window opened by YCM results in inconsistent Vim state

I think I'm supposed to file a bug report, however I'm not sure if for Vim or for YCM, so I'm asking this question to better understand what is really happening. YCM has the :YcmCompleter ...
Enlico's user avatar
  • 2,214
2 votes
2 answers
562 views

How to save quickfix list per Neovim session using :mksession?

I could not find this in :h sessionoptions. If this cannot be done, is there another way to save quickfix list to some file and reload it?
Ariel Frischer's user avatar
2 votes
1 answer
44 views

How to get command-line mode typing to interact with incsearch

When I type the pattern part of a global command (like so: :global/xxx), the windows in front of me get highlighted as if I was typing directly into a / or ? style search command. I'm writing a small ...
Ari Sweedler's user avatar
6 votes
1 answer
232 views

How to ignore beginning of line in errorformat

I have error or warning messages from some tool with the following format: 2022-08-18T21:25:01.972 WARNING ##] file:///Users/myuser/somedir/file.txt:123: Error: something went wrong One of the built-...
lelgetrekt's user avatar
0 votes
1 answer
360 views

TypeScript: is it possible to see errors not in one line?

Now I have this: Sometimes errors are big, and in order to see them clearly - I run tsc to see this: Also, is it possible to see a type name, but not a fields enumeration? I use ALE and tsuquyomi.
Vitaly Zdanevich's user avatar
1 vote
0 answers
38 views

How to escape filename for the quickfix list?

Let's say you have a filename containing a tab. $ echo stuff > foo$'\t'bar Inside Vim you want to add that file to the quickfix list. By way of context, if you use a single-quoted string, a.k.a ...
Andy Stewart's user avatar
  • 1,359
4 votes
1 answer
242 views

How to normalize a file path opened from the quickfix window?

Setup I am using NeoVim v0.7.2 (also tested with v0.6.1) on Windows 10 in git-bash, with vim-dispatch to allow for asynchronous builds (building a C++ codebase with Clang). I have this option in my ...
Ad N's user avatar
  • 141
2 votes
1 answer
68 views

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 ...
run_the_race's user avatar
0 votes
2 answers
179 views

Translate file paths in quickfix list

I'm using msys + vim + ninja + MSVC on windows. When building, the quickfix list has errors that use the windows path, ie c:\work\folder\file.cpp Vim handles it ok-ish, it can open the files, but ...
user92979's user avatar
  • 101
0 votes
1 answer
195 views

How to remap <C-cc>?

I want to map to close quickfixlist, but when I do it will just send a message Type :qa and press <Enter> to exit vim. I just do this nnoremap <silent><C-cc> :cclose<CR>
zer09's user avatar
  • 229
3 votes
0 answers
36 views

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 ...
idbrii's user avatar
  • 661
1 vote
1 answer
212 views

How to add custom errorformat at the beginning of the list

I added a custom errorformat in my .vimrc like this: set errorformat+=ERROR:\ %f:%l:%c:\ error:\ %m However, this doesn't work because an already existing format is matched first (incorrectly). In ...
lelgetrekt's user avatar
3 votes
1 answer
499 views

Using Quickfix list, how to add a line/string to a certain line number of each file

Scenario: I've got 4 files in my Quickfix list and I want to add a new line, "status": "not started", onto line 5 of each of them. I tried this: cfdo norm 5GO"status": &...
Ben Frain's user avatar
  • 217
1 vote
1 answer
27 views

vim logfile reviewer auto file follower

I am sure this has been solved, but I cannot find a matching question. I have a log file with the format: <LOG SEVERITY> <FILENAME> (<LINENO>) @<TIME> <MESSAGE> Where <...
pbal's user avatar
  • 11
1 vote
1 answer
57 views

Issue with makeprg Shell Script $? Variable

I have the following .vimrc: let &makeprg="./run-tests" The contents of run-tests: #!/bin/sh error_file=$(mktemp) coverage run --source "$PWD" --branch -m pytest tests/ >&...
Edward Chamberlain's user avatar
1 vote
1 answer
412 views

How to change the filename in a quickfix list?

I use machines with vim 8.1.2269 I have a common situation where I cross compile on one machine and debug on another. As such I'll generate an error.err file to use with vim's quickfix feature. I have ...
roro's user avatar
  • 135
0 votes
1 answer
86 views

E926: Current location list was changed error when pressing Enter in quickfix

I have a quickfix window that lists errors in my php file like tests/phpunit/MyTest.php|425 error| unexpected 'return' (T_RETURN) I used to be able to hit Enter and jump to the file and line, but now ...
artfulrobot's user avatar
0 votes
1 answer
77 views

Sort quickfix entries by most relevant files?

I have a project that has a lot of warnings. I'm wondering (until I fix all the errors) how I can make my quickfix results more relevant? My compiler script uses %t so it can differentiate errors from ...
idbrii's user avatar
  • 661
0 votes
2 answers
697 views

How can I prevent vim from auto-opening the first quickfix list item?

Basically, I'd like the same type of behavior as when you use :grep! vs. :grep. I'm using a find-files plugin that outputs to the quickfix list and I don't want vim to automatically open the first ...
amnesia's user avatar
  • 101
1 vote
1 answer
129 views

Change Directory with Errorformat

I'm trying to write an errorformat for JUnit. Directory structure from cwd is: unsw/piazza/PiazzaForum.java unsw/piazza/Thread.java unsw/test/PiazzaTest.java Amongst all the cruft outputted by JUnit, ...
Edward Chamberlain's user avatar
1 vote
4 answers
713 views

How to Create Sublime-Like Build Systems in Vim?

I am currently new to neovim. Something that has me a bit stuck is being able to easily run my code. The text editor I used before trying out vim was Sublime Text 3, and, in that text editor, all I ...
InsertSON's user avatar
  • 396
1 vote
2 answers
216 views

Go back to previous position when coming out of quickfix

When I navigate out of the quickfix list, the split I get put back in is not the same as the one I left. For example: vim -u NONE :copen open quickfix list ^w w leave quickfix list :vsplit open a ...
Marcel's user avatar
  • 133
1 vote
2 answers
200 views

How to avoid getting search results from files that are in a directory that contains a folder named "xyz" in its path

I would like to exclude results of a vimgrep search pattern from the quick fix list. The exclusions should be for all files that are under a directory or parent directory called "xyz". ...
Dsp guy sam's user avatar
1 vote
3 answers
304 views

Function That Substitutes Across Multiple Files

I'm trying to create a function that implements the functionality outlined here: Vim search replace all files in current (project) folder My current attempt: nnoremap <C-F> :call ...
Edward Chamberlain's user avatar
1 vote
2 answers
201 views

How do you prevent a new window from opening when running :make

Whenever I run :make in Vim, it always takes control away from my buffer, places me in a temporary view where I see the makeprg's output and then prompts me to "Press ENTER or type command to ...
ColinKennedy's user avatar
1 vote
0 answers
80 views

vimtex-compiler-ss does not open quickfix

Due to my muscle memory(aquired from vim-latex and other code compilation, so <F10> is universal compiler for me), I prefer singleshot calculation. I do have given a shot to \ll and then just ...
BaRud's user avatar
  • 491
1 vote
1 answer
161 views

grep in my specific dictionary

I often need to make a case-insensitive search of the current word (under cursor) in a dictionary file which has a simple txt format, one entry per line. One possible solution is to record a macro in ...
user27145's user avatar
0 votes
2 answers
137 views

vim get error properly formatted in quickfix

Please find my minimal vimrc (whatever I use for Latex compilation) "General "{{{ set nocompatible " because vim is not vi "set autowrite ...
BaRud's user avatar
  • 491