Menu

#1 Display line number and column number

open
nobody
5
2010-11-01
2010-11-01
No

I regularly process docbook files into pdf. In this process there might be an error message saying "error x in line 123456 col 1234". So it would be great to move rowscope to the line and the row number.

Maybe just the usual loading process and another column in the display area that counts linefeeds. And a counter for the column in the extra window.

For very large files when you have to position the cursor to some file offset the line number is incorrect of course, but at least you had some sort of line counter from your start. Every repositioning might just reset the counter to 1.

Discussion

  • aferrandi

    aferrandi - 2010-11-05

    Tell me please if I understand correctly. What you want is:
    - a way to go to a specific line of the file.
    - a column in the standard view that shows the line number

    I have to see how to do it. Rowscope works already "by line", but not in these terms.
    Anyway, I wanted to make a new version of Rowscope but did not find any real new feature to add. This can be it.

     
  • Ewald Arnold

    Ewald Arnold - 2010-11-06

    Hello,

    yes, you understood my intentions correctly :-) from my understanding, rowscope already does most what is needed. I want to just *see* the current line number. An additional bonus would then be to tell it to eat lines until a certain one is reached, so you need not tell it repeatedly to seek to offsets. And for really long lines a column (not row as previously written) display is useful to find the faulty position.

    As a side note: the installed files were rather big, much more than 10 MB. I tried to repack the jar files with compression and now they take much less space. It would be fine if the jar files themselves could be compressed in the next release :-)

    Since I have multiplatform projects I did another hack and changed the internal path to the swt jars (gtk / win). So I could store all jars in a single directory with roughly this layout:

    rowscope-linux.jar --> linux/swt.jar
    rowscope-win.jar --> win/swt.jar
    win
    swt.jar
    linux
    swt.jar

    Maybe you find it worth adapting in a better way :-) I was a bit puzzled when I tried to store the files in the same place which did not work.

    greets

     
  • Nobody/Anonymous

    Added a line number column. Next version will have the possibility to search by line number.

     
  • Ewald Arnold

    Ewald Arnold - 2011-06-10

    I already noticed the new version :-) what I am still missing is some more support for long lines. Those from my fo-files tend to be really awfully long :-)

    How about some alternative to the current window (after the double click on a row) with a fixed window width where you follow the offset in the line similar to the display hex editors use? See http://en.wikipedia.org/wiki/File:Hexedit-screenshot.png. On the left there is a display for the offset.

    If you take your current window, add an indicator for the cursor offset at the top, set the width to maybe 100, use a fixed width font and place counter increment values left to the text widget you can quite easily follow a long line.

     

Log in to post a comment.