11 votes
Accepted

How do I wrap the location-list by default (without turning on wrap for files)?

You can indeed use an autocommand: augroup MyStuff autocmd! autocmd FileType qf setlocal wrap augroup END This will affect the quickfix window, too, but I presume that would be desirable. You ...
Rich's user avatar
  • 31.7k
7 votes
Accepted

how to check whether the location list for the current window is open

how to check whether the location list for the current window is open You could try to inspect the 'winid' property of the location list. If the location window is open, the value of the property ...
user938271's user avatar
  • 5,907
3 votes

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

To answer your question more directly, you can use :help :cexpr or :help :cgetexpr in combination with :help system() to populate the quickfix: :cexpr system("find . -iname \*.py | xargs grep -n '...
romainl's user avatar
  • 40.1k
3 votes
Accepted

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

The gF command is jumping at a specific line within the file. It open the file at the number specified after the file name where the file name and the line number are separated by a non isfname ...
Vivian De Smedt's user avatar
3 votes
Accepted

How to differentiate quickfix window buffers and location list buffers?

Ah ah. I've just implemented a function on the subject very recently: https://github.com/LucHermitte/lh-vim-lib/blob/master/autoload/lh/qf.vim#L125 If your version of Vim is recent enough, the ...
Luc Hermitte's user avatar
  • 17.3k
3 votes
Accepted

How to remove a line from the location list?

Recent vim version has a builtin package cfilter for this. :packadd cfilter :Lfilter! /pattern-to-delete/ This will remove all lines in location list (or Quickfix list if CFilter is used) that ...
balki's user avatar
  • 355
2 votes

How to remove a line from the location list?

There's no builtin command, so you need to do a bit of scripting. Sort of this :call getloclist(0)->filter('v:val.text !~? "test"')->setloclist(0) Alternatively, you may want to ...
Matt's user avatar
  • 20.6k
2 votes

Map a key with a condition

This is not exactly what you asked for, but well known plugin vim-unimpaired by Tim Pope adds short mappings for many commands, including :lnext which is the one you're after. The vim-unimpaired ...
filbranden's user avatar
  • 28.7k
2 votes

Get number of warnings and errors from the current location list in vimscript

ALE provides a function ale#statusline#Count(buffer) for this purpose: Given the number of a buffer which may have problems, return a |Dictionary| containing information about the number of ...
D. Ben Knoble's user avatar
  • 25.8k
2 votes
Accepted

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

You can use the CmdlineChanged event to set the highlight: command -nargs=+ Test echo <q-args> augroup hl-Test au! au CmdlineChanged * \ if getcmdtype() == ':' &&...
Martin Tournoij's user avatar
1 vote

Fundamental difference between location list and quickfix list

The quickfix list and the location list are actually the same feature, implemented in src/quickfix.c. The location list is more of a special case than anything. The way I see it, the two lists have a ...
romainl's user avatar
  • 40.1k
1 vote
Accepted

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

To wrap the lines of any window, you can run :set wrap. To modify error messages, you either need to configure or improve the program that produces them or [if all the information is already present ...
D. Ben Knoble's user avatar
  • 25.8k
1 vote

How to remove a line from the location list?

Is the loclist coming from the result of running :make ? If so, then you can add to the errorformat setting using %-G<pattern> to ignore all error lines matching <pattern>. The ...
Chris Heithoff's user avatar
1 vote
Accepted

Add flake8 ignore comment automatically from syntastic location list

I guess one answer would be a mapping to (untested) $yi[<CR>A # noqa: <esc>p (I think $yi[<CR>put =' # noqa: '.@@<CR>J is equivalent.) You would want to map this in the ...
D. Ben Knoble's user avatar
  • 25.8k
1 vote
Accepted

How can I have lnext/lprev fallback to cnext/cprev when appropriate?

nnoremap <silent><F9> :call <SID>qfnext(v:false)<CR> nnoremap <silent><F10> :call <SID>qfnext(v:true)<CR> function! s:qfnext(next) abort " find all ...
Matt's user avatar
  • 20.6k

Only top scored, non community-wiki answers of a minimum length are eligible