Re: [dev] my suckless.org compatible ideas: vim like mapping for any tools, C scripts, vi clone

From: Bjartur Thorlacius <svartman95_AT_gmail.com>
Date: Fri, 14 May 2010 20:02:57 +0000

On 5/14/10, mobi phil <mobi_AT_mobiphil.com> wrote:
> Hello,
Hi
> as I am already here, and time is short in life, I would like to share
> with the community a few suckless.org compatible ideas:
As others have pointed out, some of your ideas are not so suckless,
but I'll respond to the ones I find the most interesting.
> 1. good tools should have a way to define easily keyboard shortcuts.
True. It's quite irritating that some tools use the arrow keys for scrolling,
others use hjkl (which doesn't make sense on all keyboards) and one
has to configure each seperately to use the keybindings you like.
> 1.1. Preferably good tools should have at least one predefined set of
> shortcuts that is compatible with vimi
I don't think imitiating vim is a good idea. When in a windowing system
at least it would be nice if apps grabbed all keys they wanted
(e.g. text boxes could grab all printing characters) but all other keys would
bubble up (as I think they already do in X) but if they reach the root window
they could be rethrown in the original window, but as some other user-defined
keys. For example if one presses <j> when focused on an image
inside web page, it would bubble through e.g. xloadimage, surf, tabbed, root
and then root would look it up and see that <j> should be rethrown as
<down> which would bubble through xloadimage to surf which would scroll
down. But I doubt it's possible in X (or does XEmbed allow for this?).
> 1.2. would make sense to define a "keyboard mapping library" that
> would define a syntax and rules for writing shortcuts.\
I like my approach better :)
> 1.3. vimperator is a firefox plug-in that is very close to this requirements
I dislike plug-ins. Stay away from them. Vimperator works in Firefox /only/.
Going from language-specific libraries to program-specific ones isn't
an improvement.
> 2. C like scripts could replace in several places slow shell or other
> scripts.
> * tcc is a tool that should one day become part of suckless.org
> * stali could experiment with an init replacement that would have
> scripts written in C and "run" by tcc, and compiled when changed. It
> should implement simple makefile like rules, thus running them in
> parallel would speed-up boot times. (I know that latest ubuntu now
> boots really fast)
I agree that using sh for programming tasks isn't a good idea, but
mainly because of sh's handling of whitespace and variables, but I
agree that compiling stuff running at boot time is probably a good
idea, unix shells are capable of much parallelism with little effort.
But how much this speeds things up is unknown. But if reordering files
on disk improves the boot time of maemo considerably, why not this.
> 3. I am looking for people who would be interested in writing a vim
> clone. I already called it viq (vi quick)
> Pankace told me that there would be already one experiment here on
> suckless.org, but I did not find it.
If you want an O/S, go download Emacs ;)
The point of suckless is to use editors instead of IDE (or anything
with the word "integrated" in it in general) with unnecessuary
"features". As a rule of thumb, one should be able to rewrite any
feature in another language. And :range!filter is a basic but powerful
feature that a editor must have and shall not be underestimated. How
would you do :0,!cat /dev/tty otherwise? If you need to optimize that,
shared memory might be the right tool. Doesn't Sam of Plan 9 have a
command language based on structured-expressions? Seems like a
powerful and suckless editor. But I can't get it to compile on my
machine because of conflicting types :(

-- 
kv,
  - Bjartur
Received on Fri May 14 2010 - 20:02:57 UTC

This archive was generated by hypermail 2.2.0 : Fri May 14 2010 - 20:12:02 UTC