Giter VIP home page Giter VIP logo

Comments (5)

japanoise avatar japanoise commented on June 14, 2024

Most unix text editors (including vim(1), emacs(1), and nano(1)) accept line numbers from a command line argument with a +, so that they can be invoked from less(1):

       The  prompt expansion features are also used for another purpose: if an
       environment variable LESSEDIT is defined, it is used as the command  to
       be  executed when the v command is invoked.  The LESSEDIT string is ex‐
       panded in the same way as the prompt strings.  The  default  value  for
       LESSEDIT is:

            %E ?lm+%lm. %g

       Note that this expands to the editor name, followed by a + and the line
       number,  followed  by the shell-escaped file name.  If your editor does
       not accept the "+linenumber" syntax, or has other differences in  invo‐
       cation  syntax, the LESSEDIT variable can be changed to modify this de‐
       fault.

vim

+[num]
    For the first file the cursor will be positioned on line "num". If "num" is 
    missing, the cursor will be positioned on the last line.

emacs

              +number 
                      Go to the line specified by  number  (do  not  insert  a
                      space  between  the  "+" sign and the number).  This ap‐
                      plies only to the next file specified.

              +line:column
                      Go to the specified line and column.

nano

+line,column
    Places the cursor on line number line and at column number column (at least 
    one of which must be specified) on startup, instead of the default line 1, column 1. 

from notepadnext.

dail8859 avatar dail8859 commented on June 14, 2024

I agree both the -n and the +n are useful. However, a quick glance shows the QCommandLineParser does not have any way to support something like a +n feature I'm aware of.

from notepadnext.

dail8859 avatar dail8859 commented on June 14, 2024

-n has been added. As mentioned, the QCommandLineParser doesn't seem to support the ability for +n. I still think it would be nice but not worth trying to implement a custom parser.

from notepadnext.

dail8859 avatar dail8859 commented on June 14, 2024

@erg

Just FYI I saw in: https://github.com/factor/factor/blob/master/basis/editors/notepadnext/notepadnext.factor

That it references the bundle ID. It recently just changed to io.github.dail8859.NotepadNext in 082a1c2

from notepadnext.

erg avatar erg commented on June 14, 2024

Thanks! We now support both bundle ids and use -n in the newer one.

factor/factor@fc37964

from notepadnext.

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.