bugGNU nano - Bugs: bug #58789, [Wish] an option to show conciser...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #58789: [Wish] an option to show conciser position information

Submitter:  Benno Schulenberg <bens>
Submitted:  Mon 20 Jul 2020 10:13:06 AM UTC
   
 
Severity:  1 - Wish Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Fri 15 Jan 2021 10:52:45 AM UTC, comment #14: 

Released in nano-5.5, as --minibar.

Benno Schulenberg <bens>
Group administrator
Thu 24 Dec 2020 03:40:35 AM UTC, comment #13: 

comment #12:

> Just noticing that when using "set minibar" in .nanorc, the "minibar" is flagged as not correct by the syntax highlighter.


Sorry, false alarm... I was using the 'enhanced' syntax files from https://github.com/scopatz/nanorc.git

Peter Passchier <pepa65>
Thu 24 Dec 2020 01:45:40 AM UTC, comment #12: 

Works great! Just noticing that when using "set minibar" in .nanorc, the "minibar" is flagged as not correct by the syntax highlighter.

Peter Passchier <pepa65>
Wed 23 Dec 2020 11:30:51 AM UTC, comment #11: 

Fixed in git, commit d31cc373 and subsequent ones, by adding a --minibar option that suppresses the title bar and shows in the status-bar space: file name, current line comma column, current character code, state flags, and a percentage that expresses the position of the cursor (line-based).

Benno Schulenberg <bens>
Group administrator
Mon 21 Dec 2020 01:30:23 AM UTC, comment #10: 

comment #8:

> It looks nicer when the percentage is at the end (see the 0009 patch).  And I must say: this percentage is actually better info that the plain line number.


I forgot to say: I LOVE the percentage! It's really all I need in terms of extra information.

Peter Passchier <pepa65>
Mon 21 Dec 2020 01:19:45 AM UTC, comment #9: 

comment #7:

> About the [x/y] information: when there is just one file open, the [1/1] info would be pointless and should thus absolutely not be there. In that case, the file name is the leftmost item, and I would like the file name to always be in the same place -- to me it is more important than the secondary [x/y] info: when switching between files, I want to to know which file I am in (the name), the counter is... just an indication of how many others are open too.


All OK, I hadn't considered the [1/1] case anymore when I started loading other files.

> (Maybe later (in a different issue) T or B or A could be shown as a sixth letter in the IMLRS set.)


I've discovered I don't care about the total number of lines. If I can see a percentage, I won't need to see T, B or A, not even in the statusbar.

Peter Passchier <pepa65>
Sun 20 Dec 2020 03:37:14 PM UTC, comment #8: 

Well, logic may say that the percentage should be placed near the line+column pair, but trying it (see the patch without leading zeroes) I don't like it.  It looks nicer when the percentage is at the end (see the 0009 patch).  And I must say: this percentage is actually better info that the plain line number.

(file #50529, file #50530)

Benno Schulenberg <bens>
Group administrator
Sun 20 Dec 2020 11:57:33 AM UTC, comment #7: 

About the [x/y] information: when there is just one file open (which is my most common use case, and in general the most common use case, I guess), the [1/1] info would be pointless and should thus absolutely not be there.  In that case, the file name is the leftmost item, and I would like the file name to always be in the same place -- to me it is more important than the secondary [x/y] info: when switching between files, I want to to know which file I am in (the name), the counter is... just an indication of how many others are open too.  (Also, the [x/y] info is information /about/ the file, just like the asterisk, so to me it makes sense that those two things are next to each other.)

The total number of lines is shown every time you save a file, or switch between buffers, or load a file, or type M-D.  So this number will not be shown constantly -- it is a waste of precious attention space.

About a percentage...  Hmm... maybe.  But then it will be same percentage that currently ^C shows (the first one), not the weird percentages that Vim and Emacs show.  Also, as the percentage is more related to the "line,column" than the character code, the latter will have to move back to the end of the row (where it was in my first iteration of the patch set).

Further, I do not want to show things like "Top" or "Bottom" or "All", because they would have to be translatable, which makes the space they need too unpredictable, meaning that I would need to reserve too much space, which is a waste.  (I would need to reserve space, because I want things in the minibar to /not/ move whenever possible.)

(Maybe later (in a different issue) T or B or A could be shown as a sixth letter in the IMLRS set.)

Benno Schulenberg <bens>
Group administrator
Sat 19 Dec 2020 07:20:49 PM UTC, comment #6: 

OK, patch8 solves the suspend issue.

Peter Passchier <pepa65>
Sat 19 Dec 2020 07:15:35 PM UTC, comment #5: 

Thanks for testing.  The attached patch should fix your ^Z issue.  The other things I will comment on tomorrow.

(file #50525)

Benno Schulenberg <bens>
Group administrator
Sat 19 Dec 2020 04:09:19 PM UTC, comment #4: 

Yes, I've been running with the seven patches.
- LOVE the character information!
- Love the space, just a single line gone.
- Love that the bottom bar stretches to 100% and doesn't change with the width of the information displayed.
- Req: I would like the files/tabs information at the left side of the bar, before the filename. Then it doesn't shift, and is information I would consider coming before the filename.
- Req: You know I would like the total number of lines, or the percentage of where I am at in the file. In fact, I would miss that so much that these patches are unusable in the long run. I just need to know where I am when I am paging through a file.
- Bug: I often do Undo (Ctrl-Z in my config) a number of times. I've noticed that sometimes this suspends nano, while it never used to do that (Suspend is M-Z here).

Peter Passchier <pepa65>
Sat 19 Dec 2020 03:56:34 PM UTC, comment #3: 

Peter?  Any comment on this latest patch set (seven patches)?

Benno Schulenberg <bens>
Group administrator
Tue 15 Dec 2020 09:48:14 AM UTC, comment #2: 

Here is an improved patch set, where status-bar messages are overwitten by the minibar after four fifths of a second (except for true error messages: they stay until the next keystroke).

(file #50470, file #50471, file #50472, file #50473)

Benno Schulenberg <bens>
Group administrator
Sun 11 Oct 2020 01:26:03 PM UTC, comment #1: 

It shouldn't be an option that modifies the effect of --constantshow, but does something by itself: showing a minimum amount of state information.

This state information could be: file name, whether the buffer is modified, the cursor position (line, column), the code of the character under the cursor, and the flags that are shown by --stateflags.  See attached patch set.

(file #49963, file #49964)

Benno Schulenberg <bens>
Group administrator
Mon 20 Jul 2020 10:13:06 AM UTC, original submission:  

It would be nice if it were possible to make --constantshow list only the bare essentials: line number, column number, the code of the character under the cursor (this would help with invisible characters like combining ones or the dreaded BOM), and maybe the percentage position of the cursor.  That would be clean and simple, more nano-like, and would be something I might want to use.

Maybe it could be combined with bug #57953 (report state information) and bug #58152 (no title bar) to minimize the interface and have a true status bar that shows: the file name on the left (without path, with a star when modified), line, column, character code, and state info (Mark, Recording, auto-Indenting, Hard-wrapping, an maybe Softwrapping) on the right.

Benno Schulenberg <bens>
Group administrator

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pepa65 (Posted a comment)
  • -email is unavailable- added by bens
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 19 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-01-15 bens Open/ClosedOpen Closed
    2020-12-23 bens StatusIn Progress Fixed
    2020-12-22 bens StatusReady For Test In Progress
    2020-12-20 bens Attached File- Added add-percentage-to-minibar.patch, #50529
        Attached File- Added 0009-minibar-add-a-percentage-that-shows-how-far-the-curs.patch, #50530
    2020-12-19 bens Attached File- Added 0008-input-fix-Z-issue-reported-by-Peter.patch, #50525
    2020-12-19 bens Carbon-Copy- Added pepa65
    2020-12-15 bens Attached File- Added 0005-feedback-differentiate-between-remarks-mistakes-and-.patch, #50474
        Attached File- Added 0006-minibar-add-an-x-y-counter-when-multiple-files-are-o.patch, #50475
        Attached File- Added 0007-minibar-show-the-line-count-in-the-bar-at-startup-an.patch, #50476
    2020-12-15 bens Attached File- Added 0001-tweaks-move-the-displaying-of-the-state-letters-into.patch, #50470
        Attached File- Added 0002-display-add-code-for-showing-minimal-state-informati.patch, #50471
        Attached File- Added 0003-options-add-minibar-and-_-for-activating-basic-state.patch, #50472
        Attached File- Added 0004-minibar-show-the-info-bar-again-some-0.8-seconds-aft.patch, #50473
        StatusNone Ready For Test
    2020-12-09 bens Assigned toNone bens
    2020-10-11 bens Attached File- Added 0001-display-first-implementation-of-a-minimal-state-info.patch, #49963
        Attached File- Added 0002-options-add-minibar-and-_-to-activate-the-basic-stat.patch, #49964
        Summary[Wish] an option to make 'constantshow' report conciser information [Wish] an option to show conciser position information

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code