nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] Re: sample Python regexes, revisited


From: David Lawrence Ramsey
Subject: [Nano-devel] Re: sample Python regexes, revisited
Date: Sat, 01 Apr 2006 11:03:01 -0500
User-agent: Thunderbird 1.5 (X11/20051201)

John M. Gabriele wrote:

<snip>

> Great. (Note: I'm no longer subscribed to the nano-devel list, so you
> may cc that list if you like.)

I'll do that.

<snip>

> Looks good to me, for the few Python files I've just tried it on.

Thanks for the feedback.  I've added it to nanorc.sample.

> Incidentally, I hate to say it, but I've slipped back into using vim
> for the times when I've only got command-line access and need to do
> some editing. I think the three reasons I went back are:
>
> - It can syntax-highlight almost everything correctly with or without
>   a filename extension present.

That may be something to look into for the rewrite that should become
nano 1.5/1.6 (or maybe it should be 2.0?).  The text handling has been
completely overhauled in it, so maybe the related color code will need
an overhaul as well.  (DB: any comments?)  Besides, if the new color
code breaks compatibility with the old, the nano rewrite will have to be
called 2.0.

> - I don't like nano's forward-by-word (Ctrl-Space) and back-by-word
>   (Alt-Space) key combos, and also could never get Alt-Space to work.

Unfortunately, Ctrl-Space has to be the default for Pico compatibility,
and Alt-Space seems to be the only intuitive keystroke for the reverse
function.  The rewrite should have rebindable keys in order to get
around this, though.

In the meantime, I'll try to help you get Alt-Space working.  You may
not use nano anymore, but if anyone else has the same problem you do,
I'd like to know what to tell them (other than "use a different editor"
;) I'm somewhat biased in this regard), if possible.  I've searched for
a solution, and all I've been able to find out is that the behavior can
be turned off via a configuration option if you're using the PuTTY
terminal (which doesn't help you, since you're apparently using xterm),
and that some window managers intercept it for use as a menu key (which
may help you).  What window manager are you using?

> - nano doesn't have an undo.

The rewrite will have this.

> I don't really like vim (nor the whole idea of a modal editor), but
> that smart syntax highlighting is powerful stuff. And also, I use
> forward-/back-by-word all the time.
>
> Regarding key bindings, my favorite are the uber-simple NEdit ones,
> but they rely on arrow, home, end, page-up, and page-down keys, and I
> guess the worry is that you shouldn't have a terminal-based editor
> rely on those keys (?).

Many terminals have arrow keys, Home, End, PageUp, and PageDown, and
they can be handled in curses relatively easily.  The problem is with
modifiers for them.  For example, some word processors use Ctrl-Left
Arrow and Ctrl-Right Arrow to move backward or forward a word, but some
terminals can't tell the difference between an arrow key and Ctrl-[arrow
key].  A graphical environment with more advanced keyboard handling,
such as X11, can handle this, but having some things work only in a
graphical environment defeats one of the main purposes of nano: to be
fully useful in text mode.

<snip>

> There's some links at the bottom of my nano help sheet
> http://www.simisen.com/jmg/nano.html showing where I got the Python
> patterns from.

Thanks again.  It's in the changelog.  By the way, your nano page is
very well done.  Three suggestions: you might want to add something like

"cut to end of file    Alt-t"

to the "Selecting/Cutting/Copying/Pasting" section, you might want to
change the "search/replace" key entry to "Ctrl-\ (or Alt-r)" in the
"Searching" section, and if/when we can work out your Alt-Space problem,
you might want to mention the solution to it there.

> Now,.. about the Ruby patterns... ;)

Argh...

Good luck.  Sorry that some nano inconveniences led you to switch to the
dark side ;) although I hope that the nano rewrite will eventually pull
you back.





reply via email to

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