Coder Social home page Coder Social logo

Comments (5)

mirryi avatar mirryi commented on June 7, 2024

I've created a PR (see above) to see what the implementation might look like.

from code-minimap.

mirryi avatar mirryi commented on June 7, 2024

Alternatively, a syntax similar to that of the -r or --line-range option in bat could be used. The two options could then be condensed into one like -R <M:N>, where M is the start line and N is the end line.

  • -R 5:25 would show lines 5 to 25.
  • -R 5: would show from line 5 to the end
  • -R :25 would show from the beginning to line 25.

from code-minimap.

wfxr avatar wfxr commented on June 7, 2024

@Dophin2009 Thank you, but I don’t think this option is very useful for minimap. There are already special tools head and tail to do this. I prefer to use these tools in combination instead.

eg: pick 10 lines from line 80th

$ seq 100 | tail +80 | head -10
80
81
82
83
84
85
86
87
88
89

You can easily combine them with code-minimap:

$ seq 100 | tail +80 | head -10 | code-minimap

from code-minimap.

mirryi avatar mirryi commented on June 7, 2024

That makes sense. Though I wonder if this option could still maybe be useful to Windows users, where head, tail, and other coreutil tools are not easily accessible or convenient?

Feel free to close.

from code-minimap.

wfxr avatar wfxr commented on June 7, 2024

@Dophin2009 Your idea is good. I do not adopt this change simply because in my opinion it does not follow the philosophy of “KISS” and “Do one thing and do it well”.

For this non-daily used tool, I think it is not worth considering the applicability of each platform for a non-core function. I prefer to implement head or tail command independly if it is really necessary for many users.

Anyway, thank you for your contribution!

from code-minimap.

Related Issues (17)

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.