Giter VIP home page Giter VIP logo

Comments (8)

anjakefala avatar anjakefala commented on May 28, 2024 1

@aborruso, this feature is your request! Can you please tell midichef your preferences for its syntax? =)

from visidata.

anjakefala avatar anjakefala commented on May 28, 2024

(Nice catch, midichef)

from visidata.

aborruso avatar aborruso commented on May 28, 2024

Tomorrow I try to remember what the request was and then I answer you. Thank you very much

from visidata.

aborruso avatar aborruso commented on May 28, 2024

Tomorrow I try to remember what the request was and then I answer you. Thank you very much

from visidata.

anjakefala avatar anjakefala commented on May 28, 2024

When I went to look up the original request, it seems like you cared about selecting the top-level sheet from the CLI! #214 (comment) Not selecting a specific row/column. It wasn't you who originally proposed the orderl. =)

Saul designed it originally row:col. I think he chose that because VisiData is row-oriented, and that makes sense to me. I possibly accidentally wrote the documentation as col:row because I often think in a column-oriented fashion. Since VisiData is row-oriented, I vote we keep the existing behaviour, and fix the documentation. I can go ahead and fix it.

from visidata.

anjakefala avatar anjakefala commented on May 28, 2024

I thought about it some more.

i think probably keeping it row:col is the default approach, because we might silently break folks CLI usage with an abrupt change.

But since you did start this conversation midichef, I would love to hear yours, aborruso's and anyone else's preferences. Personally col:row felt more intuitive to me. If this is true for lots of other folks, it possibly makes sense to change it.

from visidata.

midichef avatar midichef commented on May 28, 2024

For a single argument, +row makes sense. It matches the behavior of other programs, like vim +3 and tail +3 (for tail in GNU coreutils). Which is probably where it came from.

For the case of two arguments, +a:b, to me the more intuitive meaning is col:row. It matches the general pattern of geometry for coordinates being given in the order (x,y). For example, that's how vim specifies geometry:

gvim -geometry 80x63+8+100
This creates a window with 80 columns and 63 lines at position 8 pixels from
the left and 100 pixels from the top of the screen.

I agree we should think it over, as it's definitely possible that changing tocol:row may break some scripts that rely on +:row:col. But my guess is that hardly anyone has been using it. Because nobody has complained that the simpler argument pattern +row:col (with only one colon, not two) has been broken for quite some time. It worked on visidata 2.8, but not in 2.9 and after. (At least, on my system.) That simpler form vd +2:2 currently sets the row, but not the column, because the column movement command is applied before the sheet loads. To actually apply a starting column, you have to add an extra : after the +, that is, +:row:col.

I've got a set of commits to get the +a:b syntax working, and fix a few other details, once we make a decision here. (develop...midichef:581cdf12b28278aea87ce09f7c32bf8ae1be2f0f:10e532f41225bfa75d3c9bf527812bc308cd7705)

from visidata.

aborruso avatar aborruso commented on May 28, 2024

Thank you @midichef and @anjakefala. It is a command that I have tried to use without much luck and have removed from the daily commands.
I don't have a specific preference, but I prefer a little bit more col:row, as is the case in a spreadsheet.

from visidata.

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.