Giter VIP home page Giter VIP logo

Comments (3)

nomasprime avatar nomasprime commented on August 17, 2024

What's the motivation behind this (use case), ie, why quickfix and location-list?

from ferret.

wincent avatar wincent commented on August 17, 2024

@nomasprime: You can have only one quickfix list at a time (global to Vim), but N location lists (1 per window).

So, if you only use quickfix list the only way to search for multiple things "at the same time" is to run multiple searches in series, and then move back and forth between the search results with :colder and :newer.

If you use the location list as well, you can additionally have N searches truly at the same time (ie. no switching required) and you can use :lnewer and :lolder (which cutely abbreviates to :lol), which basically means that you can juggle as many concurrent searches as you want at once, limited only by your mind.

In practice, I mostly just use the quickfix list, but on rare occasions when I need to throw in location list searches as well, it is incredibly useful. A concrete example: maybe you are refactoring and you search for FooBar in the quickfix listing. As you navigate from result to result, you occasionally need to do side-searches and you investigate angles, and you don't want to blow away your "main" search view, so you do a location list search for those.

from ferret.

nomasprime avatar nomasprime commented on August 17, 2024

@wincent Thanks for the detailed explanation.

Thought that might be the reason but couldn't imagine why I wouldn't reuse quickfix. Haven't integrated more automated search and replace into my workflow before though, I'm sure I'll run into a situation where I want to put results in the location-list at some point.

Also, thanks for the plug-in, certainly makes adding global search and replace less painful.

from ferret.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.