nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] File tabs


From: markweston
Subject: [Nano-devel] File tabs
Date: Tue, 28 Nov 2017 09:30:34 +0200
User-agent: Roundcube Webmail/1.3.3

The idea is to make the title bar more useful. Currently it's showing:
* The GNU nano version, which I find useful extremely rarely, even when I do need it I end up typing "nano -V" just because of old habits I got from all the other programs.
* Buffer index, like so: [I/N].
* The filename of the current buffer (or "New Buffer").
* The state of the buffer: Modified (which could be replaced by an asterisk to the right of the filename, which is a modern convention), View (which the user probably knows since she/he probably invoked nano with -v, or nothing.

I found tabs, like in internet and filesystem browsers and IDEs, to make the title bar more useful and helpful when navigating between more than a couple of buffers in nano. Basically, instead of drawing the title bar the way we do now, we would display the list of open file filenames. Here's an example:

 hello.c  hello.h [main.c] Makefile*  TODO.txt  READM...

In this example, there are 6 or more file buffers open. The user is currently working on main.c. Makefile is currently in the modified state. Since the title bar in this example is too small to show all the filenames, you can see "..." at the end.

I most often use nano in fullscreen mode to work in local directory with relatively shortly-named files, so in that kind of scenario I have always had enough space to display all the filenames, because it can display more than 10 at a time.

I'm not sure what should nano do when the current buffer could not be displayed. Here's a slightly modified previous example:

 hello.c  hello.h  main.c  Makefile*  TODO.txt  READM...

Here the user is working on something after README. One idea to solve this would be

 hello.c  hello.h [main.c] Makefile*  TODO.t...[NEWS]...

Which says the user is working on the NEWS file and that there are skipped or unfinished filenames both in front and before NEWS. This way user always knows what's he working on.

Anyway, I attach a patch as an example solution, which implements the dumb approach (no tricks if the current filename can't be displayed will be performed).

Attachment: 0001-filetabs-1st-version.patch
Description: Text Data


reply via email to

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