[haiku-development] Re: Vim episodes. IV. It is ready to breathe...

On 2009-05-11 at 16:06:02 [+0200], Matt <laceysnr@xxxxxxxxxxxxxx> wrote:
> 2009/5/11 Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>:
> > Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> >> Isn't that a pretty strong argument for just using nano as the only
> >> CLI
> >> editor and let "power" users install vim, if they prefer? It costs
> >> only a
> >> few clicks and everyone is happy.
> >
> > I tought about it a bit more, and I would be fine with this, as well:
> > even though POSIX suggests to install vi, what good could it possibly
> > bring to someone that does not know how to use it? On the contrary,
> > leaving it out at least let those commands exit with an error message,
> > instead of throwing an unprepared user into a vi session.
> > As long as we have vim as an optional package available :-)
> 
> Personally I think that as long as vim is available without a working
> network connection in Haiku then using nano as the default would be
> perfectly fine.

I don't see any reason for that. The only argument so far is that some 
people like vim, but since that holds true for any editor (and we certainly 
don't want to add them all), it's just irrelevant.


On 2009-05-11 at 22:14:46 [+0200], Ryan Leavengood <leavengood@xxxxxxxxx> 
wrote:
[...]
> Back on the topic of this thread, I too am fine with just having nano
> or something similar as the Haiku command-line editor. Though Ingo's
> comment about the Cream key bindings using Ctrl made me wonder about
> nano too. Would it use Cmd on Haiku or Ctrl? AFAIK the standard
> command key for nano is Ctrl. I suppose a "proper" port of nano (or
> Cream) would take into account the shortcut key settings of Haiku.
> Hopefully that would not be too hard to do.

I'm afraid it isn't possible at all without gross hackery. Command line 
applications get their input from a TTY, i.e. they can only deal with key 
combos that generate unique character sequences. The Control-<character> 
combos are mapped to the characters < 32 and special keys (home, end,..., 
Fn) generate escape sequences, but I believe Command shortcuts don't 
generate any characters.

CU, Ingo

Other related posts: