nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

things on the minibar are distracting


From: Benno Schulenberg
Subject: things on the minibar are distracting
Date: Sat, 23 Jan 2021 13:25:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

[Sending this to the devel list, as these are design questions,
not how-to questions.]

Op 23-01-2021 om 00:20 schreef Seb:
>> ? Option 'set minibar' makes nano suppress the title bar and instead
>>  show a bar with basic editing information at the bottom: file name
>>  (plus an asterisk when the buffer is modified), the cursor position
>>  (line,column), the character under the cursor (U+xxxx), the flags
>>  that --stateflags normally shows, plus the percentage of the buffer
>>  that is above the cursor.
> 
> I like the idea of having three more lines of the file displayed on the 
> screen.

Well, it displays just one more line of the file: there where the title bar
was.  (Unless you were a user of --emptyline, then it gives two extra lines.)

> I'm not sure about some details though:
> 
> * Does this line really have to be at the bottom of the file? When I type, I 
> use
> mostly the bottom half of the screen, thus the "minibar" line is more 
> distracting
> to me at the bottom of the screen than at the top.

If the minibar would be placed at the top of the screen, then also the status
bar and the prompt bar would have to be there, otherwise we wouldn't gain an
extra line.  But the thought of having status messages like "Not found" at the
top is horrible.  And the thought of having a prompt there is even worse.

Also, the "line,column", the character code, and the percentage are kind of
feedback things, so to me it makes the most sense to show them at the bottom,
where normally the status bar is.

(Also, if all bars were at the top, what do we do with the help lines?  They
would have to be suppressed entirely, because having them at the top is too
ugly, and having them at the bottom while the status bar is a the top would
majorly complicate the code -- I don't want to go there.)

> * The counter of chars on this line changes every time I type a letter
> (obviously),

It is not a character counter, but indicates the current column of the cursor.
With zero-width and double-width characters, the number of characters to the
left of the cursor can be larger or smaller than the column number.

> thus it "flashes" and it distracts me from what I'm typing. The
> information "line count,char count" is already available with ^C, does it 
> really
> need to be available at all times?

^C gives /far/ too much information.  All the needless info shown by ^C is
one of the two reasons that made me make --minibar.  From among all that
info all I want is the column number of the cursor.  The line number is
there only to let it make sense.

> * Idem for the Unicode code, it flashes and seems rarely useful.

It is rarely useful, but it is the other reason why I made --minibar:
sometimes I come across invalid bytes and I want to see what code they
are.  Having to select the fragment, write it out to a file, exit from
nano, xxd the little file, and then restart nano was a nuisance.

Having this info the whole time in the bottom bar may be a distraction
to you, but fifteen years of using nano has made me ignore whatever is
on the bottom row -- unless I hear a beep or invoke a prompt.  I see
things on that row only when I directly look at it.

> To go even further along the "minibar" idea: would it be possible to let this
> line disappear completely with a keyboard toggle, perhaps ^C?

(You probably mean M-C, as the --minibar option turns M-C into a no-op.)

Hmm...  That would be an idea.  It would not give another extra line of
editing space, though, because that bottom line needs to stay reserved
for status messages and prompt bar.  But... see attached patch for a
rough first implementation.

>> ? Option 'set markmatch' highlights the result of a successful search
>>  by putting the mark at the end of the match, making the match more
>>  visible.  It also suppresses the cursor until the next keystroke.
>>  (If you dislike the hiding of the cursor, use 'set showcursor'.)
> 
> I love it already.

I like the improved visibility of the found occurrence, but having it
marked is a bit of a hindrance.  Apparently, after having searched for
something, I often want to delete the relevant line, but now the first
^K deletes the found text.  It needs a second ^K to delete the line.
I still haven't gotten used to this.

Benno

Attachment: make-M-C-suppress-the-minibar.patch
Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]