[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH] Implement quick switch between open buffers
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] [PATCH] Implement quick switch between open buffers |
Date: |
Wed, 20 Dec 2017 21:44:09 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
Op 18-12-17 om 02:54 schreef Marco Diego Aurélio Mesquita:
I use nano to edit its own source code. Usually, I just type
"./src/nano ./src*.[ch]". Linearly iterating through these files is
not as good as choosing from a list.
Hm. If that were the only use case of an editor, to edit itself,
then... it is useless.
But if it's just an example... Twenty files is not much: I can
flip through them faster with Alt+< and Alt+> than when using
M-G ^O <Right> <Right> <Down> <Down> <Enter>. The latter is
five different key combos, and my eyes have to search across
the screen to find the file that I want, and then I have to
move the highlight there. When flicking through the files
with Alt+<Right>, I can keep my eyes on the middle of the
title bar and quickly find the file that I want. With just
twenty files, I am sure that I will always be quicker with
a single key combo than you with the buffer browser.
There's some code duplication between read_the_list() and
list_current_files() (now called list_current_buffers). What about a
function to adequately set 'longest' and 'width' that is called by
both?
Sure, as a follow-up patch. That way it will be clearer that you're
factoring out a bit of code.
The shortcut "^B" can not be used because it is tied to backward the
prompt's cursor. Chose "^R" for now. Do you have better suggestion?
Nope. It's just that I find M-G ^O somewhat hard to type. Maybe it
should be M-G M-G, to make it quick to type?
Any other change?
The patch in itself looks okay. It's comprehensible. There are some
things that I would write differently, but that's all minor.
One thing is still lacking, though: when you type ^G in the buffer
browser, it should put up a help text specific to browsing buffers,
not to browsing directories and reading and writing a file.
But know well: I do not plan to incorporate this patch (set) in nano.
I don't think nano needs such a feature.
Benno