title: What is the difference between location list and quickfix list in vim
body: <p>The following is from the documentation about the quickfix list and location list. But I am not sure what actually different. The image below shows the same things from the location list and quickfix list. When do I use one or another in vimgrep and lvimgrep. </p>
  
  <pre><code>In Vim the quickfix commands are used more generally to find a list of positions 
  in files.For example, |:vimgrep| finds pattern matches.  You can use the positions 
  in a script with the |getqflist()| function. Thus you can do a lot more than the
  edit/compile/fix cycle!
  ...
  ...
  
                           *location-list* *E776* 
  A location list is similar to a quickfix list and contains a list of positions 
  in files.  A location list is associated with a window and each window can have 
  a separate location list.  A location list can be associated with only one window.  
  The location list is independent of the quickfix list.
  
  ...
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/eVz8S.png" alt="enter image description here"></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I found the following <a href="http://vim.wikia.com/wiki/Find_in_files_within_Vim" rel="noreferrer">from here</a>.</p>
  
  <pre><code>These commands all fill a list with the results of their search. "grep" and 
  "vimgrep" fill the "quickfix list", which can be opened with :cw or :copen, 
  and is a list shared between ALL windows. "lgrep" and "lvimgrep" fill the 
  "location list," which is local to the current window, and can be opened 
  with :lw or :lopen. Both of these lists can be used to instantly jump to 
  the matching line in whatever file it occurs in.
  </code></pre>
  
  <p>So the difference is all windows for quickfix list and local window for location list. However I can open location list from any other windows. So what is the difference then??</p>