nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] patch for navigation in view mode


From: Chris Allegetta
Subject: Re: [Nano-devel] patch for navigation in view mode
Date: Sun, 19 Oct 2008 01:35:03 -0400

I like the intent here, but there are some philosophical ideas here that it contradicts:

-The view mode in nano (inherited from Pico) is I think purposely not toggle-able during the edit session. I believe it has historically been used to give someone with restricted access a read only copy of a file. The obvious counter argument here is of course that the right way to handle such a situation is with file permissions, and I would guess the original usage was more common with Freenet or BBS systems. Also, I honestly have never ever even used view mode, as it's useless to me in that capacity in it's current form (see below for why).

- hard coding these values into the code is a no-no given the new key binding code. I could envision some new menu type called 'view' that would be used to populate the main shortcut list when in view mode. This way other keystrokes that are already claimed by nano in normal operation (e.g. ^f and ^b) could be rebound to function as expected.

-To be really useful as a pager, nano should unction like one when reading from a pipe instead of a file. I've tried unsuccesfully to add this functionality in the past, but stabilizing the code base after adding undo/redo has been consuming all my free time, even though this functionality would be a huge win.

In short I can''t accept this patch in its current form, but I think the idea warrants further investigation and discussion.

--
Chris A

On Oct 16, 2008, at 2:04 PM, Jason DeVita <address@hidden> wrote:

Hi,

I've made a patch to allow vi/less style navigation while in view- mode, and also to toggle between view and edit modes. Basically, Mod-1 toggles view-mode. And when in view-mode, you can use h-j-k-l to move the cursor, 'b' and <space> to page up/down, '/' to search, n/N to find next/previous match, g/G to goto start/end of the document, and 'q' to quit. I find it much faster to use these when I'm mostly navigating, and not doing much editing.

I'm not much of an applications programmer (I normally write numerical/scientific stuff), so I don't know if what I did is wrong or bad. But it seems to work for me. The patch is on the svn tip (as of today).

Regards,
Jason
<view_nav.patch>
_______________________________________________
Nano-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/nano-devel




reply via email to

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