Questions tagged [quickfix]
Questions about the usage of quickfix commands and quickfix windows.
151
questions
0
votes
1
answer
41
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 ...
2
votes
3
answers
62
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 ...
1
vote
2
answers
95
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 ...
0
votes
1
answer
41
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:
:...
2
votes
1
answer
55
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.
...
0
votes
2
answers
41
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 ...
0
votes
0
answers
15
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 ...
1
vote
1
answer
171
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?
2
votes
1
answer
34
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 ...
6
votes
1
answer
127
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-...
0
votes
1
answer
82
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.
1
vote
0
answers
26
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 ...
4
votes
1
answer
101
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 ...
2
votes
1
answer
32
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 ...
0
votes
2
answers
64
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 ...
0
votes
1
answer
109
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>
3
votes
0
answers
22
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 ...
1
vote
1
answer
65
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 ...
3
votes
1
answer
192
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": &...
1
vote
1
answer
25
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 <...
1
vote
1
answer
39
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/ >&...
1
vote
1
answer
199
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 ...
0
votes
1
answer
70
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 ...
0
votes
1
answer
28
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 ...
0
votes
2
answers
387
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 ...
1
vote
1
answer
91
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, ...
1
vote
4
answers
517
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 ...
1
vote
2
answers
125
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 ...
1
vote
2
answers
74
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".
...
1
vote
3
answers
239
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 ...
1
vote
2
answers
122
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 ...
1
vote
0
answers
65
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 ...
1
vote
1
answer
126
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 ...
0
votes
2
answers
116
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 ...
2
votes
3
answers
7k
views
How can i compile cpp using vim
I want to be able to compile c++ code from within vim without running a new terminal and calling the compiler. **How can I do it ** please
1
vote
1
answer
70
views
Difference between make and make!
According to the help page the only difference between :make and :make! is that the latter doesn't jump to the first error. So why isn't :make! <Bar> silent cnext<CR> equivalent to :make?
...
6
votes
1
answer
530
views
How to navigate vim buffers using quickfix list?
I am trying to come up with a way to populate the vim quickfix window with the output from :ls
I tried some variants like cexpr ":execute ls" but it doesn't work.
Can someone please help me ...
4
votes
1
answer
429
views
Import an error file to the quickfix list without leaving vim
I know that the quickfix list is very useful for the edit-compile-edit cycle. I like the fact that we can jump directly to an error from it.
Actually I am trying to understand the way I can parse a ...
1
vote
1
answer
56
views
Compile man pages written in groff_man?
What would you reccommend as makeprg for compiling nroff documents (for man pages)? I currently have it set to mandoc because it works when I do it from the terminal: mandoc foo.1
When I run :make, it ...
0
votes
1
answer
322
views
Unmapping keys for a specific buffer(quickfix) only?
I usually have j and k bound to gj and gk, respectively for navigating wrapped lines. But this becomes annoying when I have to use the quickfix window, so I thought of using something like :
augroup ...
0
votes
2
answers
494
views
How to disable the quickfix window?
This is the display when I typed :AsyncRun -mode=term -pos=bottom ~/.anaconda/bin/python %.
But if I set:
filetype plugin on
map <F5> :call RunPython()<CR>
function! RunPython()
exec &...
2
votes
1
answer
225
views
Remove full path from quickfix list when using vimgrep
I use VIM 7.4.
When I want to search some text in my project, i use following command:
:vimgrep /pattern/j *.c *.h
Then I use :cw command to open quickfix list for getting search results.
Here is my ...
0
votes
1
answer
98
views
Not recognising "In file included from"
I'm using the default errorformat, but messages starting with "In file included from" aren't giving me the quickfix output I expect
For example:
|| [ 0%] Building CXX object CMakeFiles/blah/...
0
votes
1
answer
45
views
error not formatted as per efm
I have created a mwe plugin to show my problem for fortran ft.
tree ftrial
ftrial
├── autoload
│ └── makes.vim
└── ftplugin
└── fortran_mk.vim
with
cat ftrial/autoload/makes.vim
" ...
1
vote
1
answer
48
views
Buffer opened when compiling succeeds
I am writing a vim plugin for the fortran filetype.
In an autoload script, I have done:
" File Name: autoload/makes.vim
let s:Compiler = get(g:, "fortran_compiler", "gfortran"...
1
vote
1
answer
145
views
Text to vim-quickfix with navigation
LaTeX, being a markup language, is very hard to grammar-check. I found one program, that do this exactly Textidote. Problem is, this is a standalone program and, for example, this latex code:
\...
0
votes
1
answer
346
views
How can I have lnext/lprev fallback to cnext/cprev when appropriate?
It is often the case that I am in projects with varying filetypes. Sometimes I'm compiling using :make<CR> and sometimes I'm using plugins like ALE. At any given time, I probably only have one ...
0
votes
1
answer
33
views
Quickfix stack doesn't work when using make -j
As mentioned in other questions, using make -C buildpath as makeprg in Vim and the appropriate errorformat triggers the nice handling of the quickfix directory stack.
That is, the quickfix uses the "...
1
vote
1
answer
296
views
How to insert text using substitute and regex?
Honestly I can't read regex for now.
I have quick-fix list and I have a hunch that this can be done with regex but I don't know how.
I want this:
@ViewChild(MatTable)
@ViewChild('text 1')
@...
2
votes
1
answer
145
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 ...